pooya panahandeh
pooya panahandeh

Reputation: 23

Error Uploading app to android market

if you work with cordova please help me to solve this error from google play :

Upload failed You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode. You need to use a different package name because "io.cordova.hellocordova" already exists in Google Play.

Upvotes: 1

Views: 2178

Answers (3)

balzafin
balzafin

Reputation: 1426

Ok, I don't know if you're using PhoneGap Build or building locally, but I'm giving it a shot anyway. So if you are using PhoneGap Build:

You need to use a different package name because "io.cordova.hellocordova" already exists in Google Play.

To fix this error, you need to open your config.xml and change the id of your app from the widget element to something unique. For example "io.cordova.panahandeh":

<widget xmlns     = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "io.cordova.panahandeh"
        version   = "0.0.1">

You uploaded a debuggable APK.

To solve this one, you need to change a setting called Enable debugging from the PhoneGap Builds basic settings. So, on PhoneGap Builds Apps page:

  1. Open your app
  2. Open the settings tab
  3. Uncheck the Enable debugging checkbox
  4. Press Save

If you haven't already digitally signed your app with a certificate, you must also do that before the app can be uploaded to Google Play. You can create a Android Signing key from command line by using Java keytool: http://docs.build.phonegap.com/en_US/signing_signing-android.md.html

After you have created the key, you must upload it to PhoneGap Build before building the app:

  1. From the top right corner click the user icon and select edit account
  2. Open the Signing Keys tab
  3. Under Android press Add key..
  4. Give the key a Title and an Alias, upload the key you earlier created and press Submit key
  5. Unlock the key by pressing the yellow lock icon and giving the the password to your key
  6. Go back to the Apps page and open your app
  7. Under Android, open the drop down where it says No Key Selected and choose your key
  8. Rebuild

Upvotes: 4

QuickFix
QuickFix

Reputation: 11721

  1. it seems when you created your project, you didn't specify a package name. When you create your project, you have to run

    cordova create dirname packagename displayname

The packagename must be unique and look like something like this : com.mokshash.test. Look at the doc for more details.

  1. To be able to upload your app to google play, it has to be built in release mode. So when you build the apk you want to upload to google play, you have to run

    cordova build --release android

This will generate an unsigned apk

  1. Final step, you need to sign your app. For that you have to generate a certificate and then sign the app using this certificate. Have a look at this link for detailed steps.

Upvotes: 1

Mokshash
Mokshash

Reputation: 1

Check your manifest file.

In the AndroidManifest.xml file, remove

android:debuggable="true"

from the <application> element.

Note: If you manually enable debugging in the manifest file, be sure to disable it in your release build (your published application should usually not be debuggable).

Upvotes: 0

Related Questions