-1

By submitting APK PhoneGap to Google Play features the following error:

SEND NEW APK FOR PRODUCTION

Sending failed you uploaded an APK debuggable. For security reasons, disable debugging before publishing it on Google Play. Learn more about APKs debuggable .. You have sent an APK signed in debug mode. Sign your APK in Release mode. Learn more about how to sign. Use a different package name. "io.cordova.hellocordova" already exists in Google Play.

How to solve it?

user3092202
  • 147
  • 6
  • Sign your apk with release key. See http://developer.android.com/tools/publishing/app-signing.html and http://developer.android.com/tools/publishing/preparing.html – Rohit5k2 Jan 29 '16 at 19:19

2 Answers2

2

To generate a release build for Android, we can use the following cordova cli command,

$ cordova build --release android

we can find our unsigned APK file in platforms/android/build/outputs/apk.Now, we need to sign the unsigned APK and run an alignment utility on it to optimize it and prepare it for the app store.Let’s generate our private key using the keytool command that comes with the JDK.

$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

You’ll first be prompted to create a password for the keystore. Then, answer the rest of the nice tools’s questions and when it’s all done, you should have a file called my-release-key.keystore created in the current directory.

To sign the unsigned APK, run the jarsigner tool which is also included in the JDK with the following command,

$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name

This signs the apk in place. Finally, we need to run the zip align tool to optimize the APK. The zipalign tool can be found in /path/to/Android/sdk/build-tools/VERSION/zipalign.use this command to zipalign the apk,

$ zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

Now we have our final release binary called HelloWorld.apk and we can release this on the Google Play Store for all the world to enjoy!

404
  • 1,115
  • 2
  • 11
  • 21
0

You are probally sending the Debug mode Apk located at "bin" folder. It's incompatible with Google Play deploy.

You should create a release version, like Rohit5k2 suggested. To do that, just do the following:

Create release APK Android Studio

Create release APK on Eclipse

Hope it helps! Best regards! O/

Community
  • 1
  • 1
Cordovaing
  • 301
  • 1
  • 8