Generating unsigned, release apk with Android Studio

﹥>﹥吖頭↗ 提交于 2019-11-30 01:53:18

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.

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:

  • C:\ANDROID_PROJECT_DIRECTORY\app\build\outputs\apk\

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!