Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode error

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

When I try to uplaod the application on the playstore, I get the error You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode. Can anyone please tell me how to sign the apk in release mode? I am new to Maven (started using it today). Thanks

like image 852
Nemin Avatar asked May 21 '13 23:05

Nemin


People also ask

How do I enable debug on APK?

However, you need to make sure you're using an APK with debugging enabled. To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar.

What is release debug APK?

Major differences are the debug apk and the release apk: For debug builds the apk will be signed with the default debug signing keys with debug flag enabled. For release apk you will have to explicitly specify the apk to sign with and the debug flag will be turned off so that it cannot be debugged.


2 Answers

Change to: signingConfig signingConfigs.release

from signingConfig signingConfigs.debug

in your build.gradle app level

like image 139
Asty Avatar answered Sep 28 '22 09:09

Asty


I don't know how you do that in Maven, but you need to compile your app with a release keystore. You can create one with keytool, which is available in your Java bin folder:

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

When creating it, you must supply two passwords, one for the keystore and one for the key. When your keystore is created, you can use the Eclipse Export wizard to compile your app in release mode.

For further details, please refer to http://developer.android.com/tools/publishing/app-signing.html#releasemode

like image 25
Piovezan Avatar answered Sep 28 '22 08:09

Piovezan