user3032942
user3032942

Reputation: 139

Unable to upload Phonegap Build APK to play.google - You uploaded a debuggable APK error

Trying to upload a release version APK generated from Phonegap Build to the Google play store.

Getting an error as follows:

Upload failed

You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play.

But this is a release version? It is not in Debug mode - why this error now?

If I need to add something to the config XML to set debugging to False, what would that be?

I repeat that this is a phonegap Build project - so all I have is html, css, js and image files. These are then zipped up and uploaded to build.phonegap and they generate the IPA and APK etc etc

Upvotes: 13

Views: 15257

Answers (5)

Rick Love
Rick Love

Reputation: 12780

Martina is correct, but I want to add more details:

You must create a signing key and upload it to PhoneGapBuild to use.

Create a Keystore for Signing your build using a java utility called "keytool"

  1. Find keytool (it comes with java). I found mine at: C:\Program Files (x86)\Java\jre6\bin
  2. Open command prompt and enter the following commands
  3. cd C:\Program Files (x86)\Java\jre6\bin

    (use whatever dir you found the keytool in)

  4. keytool -genkey -v -keystore C:\DIR\APPNAME.keystore -alias APPNAME -keyalg RSA -keysize 2048 -validity 10000

    (Change DIR and APPNAME to something appropriate)

  5. Enter the keystore password (remember this)

  6. Answer the questions about yourself: your name, organization, location, etc.
  7. DONE: The keystore will be created for your app

Remaining Steps:

  • Upload that to PhoneGap Build.
  • Unlock the keystore for 1 hour by entering your keystore password
  • Build the app

This will create a release version of the .apk that can be uploaded to Google Play.

Upvotes: 15

TlmaK0
TlmaK0

Reputation: 3896

I know it's a bit late but it could be a good help for others. The problem is the platforms/android/AndroidManifest.xml, the <application android:debuggable="true"... must be <application android:debuggable="false" .... Then build again.

Upvotes: 0

Martina
Martina

Reputation: 769

Have you created a release key for android (using keytool) and added it to your project on phonegap build website and rebuilt your app? (I'm assuming from comments you are using phonegap build).

Upvotes: 1

aioweb
aioweb

Reputation: 1

If you build it with dreamweaver there is automaticly a Projectsettings file created. Set there debug mode to false.

Upvotes: 0

Purus
Purus

Reputation: 5799

From the Docs:

Make sure you deactivate logging and disable the debugging option before you build your application for release. You can deactivate logging by removing calls to Log methods in your source files. You can disable debugging by removing the android:debuggable attribute from the tag in your manifest file, or by setting the android:debuggable attribute to false in your manifest file. Also, remove any log files or static test files that were created in your project.

Also, you should remove all Debug tracing calls that you added to your code, such as startMethodTracing() and stopMethodTracing() method calls.

Link: http://developer.android.com/tools/publishing/preparing.html#publishing-configure

So in your project manifest xml file, change the debuggable attribute to false.

Upvotes: 4

Related Questions