app-release-unsigned.apk is not signed
If anyone wants to debug release build using Android Studio, follow these steps:
- Set build variant to release mode.
Right click on app in left navigation pane, click Open Module Settings.
Go to Signing Tab. Add a signing config and fill in information. Select your keychain as well.
- Go to Build Type tab. Select release mode and set:
-Debuggable to true.
-Signing Config to the config. (The one you just created).
Sync your gradle. Enjoy!
Make sure the build variant is set to debug (and not release) in Android Studio (check the build variants panel).
If set to debug, it should automatically sign the app with the auto-generated debug keystore, without editing the build scripts.
However you will need to create and configure a specific keystore for release.
Official documentation, covering debug and release modes: https://developer.android.com/tools/publishing/app-signing.html
Always sign your build using your build.gradle DSL script like this:
android { signingConfigs { debug { storeFile file("debug.keystore") } myConfig { storeFile file("other.keystore") storePassword "android" keyAlias "androidotherkey" keyPassword "android" } } buildTypes { bar { debuggable true jniDebugBuild true signingConfig signingConfigs.debug } foo { debuggable false jniDebugBuild false signingConfig signingConfigs.myConfig } }}
If you want to understand a little more of the Gradle build system associated to Android Studio just pay a visit to: