且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

生成未签名的Android Studio版本APK

更新时间:2022-03-09 07:29:09

release构建类型中,根本不要指定signingConfig,并且不会对您的构建进行签名.发行版本不会采用调试版本获得的默认签名配置,因此它应适用于这些版本.

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.

在讨论区上有讨论.有关此内容的adt-dev邮件列表.

There's a discussion on the adt-dev mailing list about it.

请记住,要从Android Studio进行构建,您需要转到Gradle任务窗口并选择assembleRelease任务;通过"Make Project"进行的常规构建实际上并没有构建最终的APK.

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.