I need to generate an unsigned, release APK (where someone else will then sign it and release it to the store- with the someone else handling the keys and e
Actually you can build an unsigned .APK just by building it:
To generate it, on the left side of the Android Studio, there is a Build Variants menu (maybe written vertically). Click it.
The Build Variants window tab has appeared, click debug and change it by release.
Rebuild your project application > Build > Rebuild Project.
Then click Run, a new window has appeared, click Run > Continue anyway > Choose the device you want to run with > OK.
The application won't work on your device but the release build version, of your .apk, will be generated into the same directory as your debug ones:
You can note that the name is app-release-unsigned.apk and it was exactly what we wanted to have.
More information on this tutorial website.
I had to do the same thing (because app signing is handled elsewhere) and I simply rebuilt the project.
To generate an unsigned release apk, select a release version in the Build Variants menu.
Note: You may get a red cross in your app configuration on the top menu, ignore it.
Rebuild your project application Build > Rebuild Project.
You will find your app-release-unsigned.apk in:
Note: If you need to create other versions, save the generated apk because subsequent rebuilds will overwrite the current apk(...don't be like me).
In the release
build type, don't specify a signingConfig
at all, and your build won't be signed. Release builds don't pick up the default signing config that debug builds get, so it should work for those.
There's a discussion on the adt-dev mailing list about it.
Bear in mind that to build from Android Studio, you'll need to go to the Gradle tasks window and choose the assembleRelease
task; normal builds via "Make Project" don't actually build the final APK.