Upload Failed : You uploaded a debuggable APK

It was quite late in the evening and I was about to wrap up my work. Suddenly I got a call form my client in Skype and he shared his concerns of uploading the build to production. Although it was late, I thought to help him before I close the day, since that guy is in the middle of his day time (in US). Now mind set is to spend time on the issue. I started looking into the issue.

The issue is, while he (my client) started uploading the APK file into the Android store, he is receiving the below rejection message from the store.

Upload Failed

I started investigating the issue. Started looking into the code. Started digging deep into the AndroidManifest.XML. To my surprise, no where it is mentioned as “debuggable : true“.  It was a killing me, since I am getting late and the issue looks strange.Then I thought of to keep my nerves calm and started looking into the solution. After couple of here and there look up in Google I reached on the below solution.

I have added the following line into the AndroidManifest.XML in the application tag.

<application
     android:debuggable="false"
     ....... >
<application/>

It warned me to avoid hard coding the debug mode. Believing on my guts, I ignored the warning and create a build for the client. I asked him to try with publishing. Wowww… It was a SUCCESS. I didn’t have time to celebrate my success on that day since it was late for home. I wrapped my stuffs and left.

Lesson learnt :
We need to specify the debuggable flag as false exclusively before publishing to the store.

Additional note :
We have used Eclipse IDE to work this above mentioned project. If we use Android Studio, this flag gets inserted automatically when we create a release build.

Written By: Nirmal Hota, Cross-Platform Mobile Lead, Mindfire Solutions

Advertisements

One thought on “Upload Failed : You uploaded a debuggable APK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s