You downloaded an APK that was signed in debug mode. You need to sign the APK in release mode error

I am trying to upload an application to the Google Play store. I create .apk and sign it using Maven. I used maven-jarsigner-plugin to sign the .apk file. I am using a key that I created using the Eclipse wizard to sign another Android application. I have a zipalign.apk file using the following command: zipalign [-f] [-v] infile.apk outfile.apk

When I try to download the application to the game store, I get an error message. You downloaded an APK that was signed in debug mode. You need to sign the APK in release mode. Can someone please tell me how to sign apk in release mode? I am new to Maven (started using it today). Thanks

+8
android maven google-play jarsigner
source share
3 answers

I don't know how you do it in Maven, but you need to compile the application with a keystore. You can create it using keytool , which is available in your bin bin folder:

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

When you create it, you must provide two passwords: one for the keystore and one for the key. Once your keystore is created, you can use the Eclipse Export Wizard to compile your application in release mode.

See http://developer.android.com/tools/publishing/app-signing.html#releasemode for details

+3
source share

Always create a keystore with a name and an alias containing "release" and not "debug". If you have "You downloaded an APK that was signed in debug mode. You need to sign the APK in a release mode error," it is sure that you are using the default key store, which is "debug.keystore", so it generates apk in mode debugging.

Decision

  • Create a new keystore
  • Specify the link in the build.gradle file
  • Change build option for release
  • Build

this should solve the problem.

0
source share

Using -genkeypair instead of -genkey solved the problem for me.

So: keytool -genkeypair -keystore name.keystore -alias nameapp -keyalg RSA

-one
source share

All Articles