[英]Android can't build release APK with gradle build tool 3.0.0-alpha2
I got a problem with Android Studio 3 canary 2, generate APK file always be a TEST version and can't install on any devices unless using command "adb install -t apkname". 我遇到了Android Studio 3 canary 2的问题,生成的APK文件始终是TEST版本,除非使用命令“adb install -t apkname”,否则无法安装在任何设备上。
The error is Failure [INSTALL_FAILED_TEST_ONLY] 错误是失败[INSTALL_FAILED_TEST_ONLY]
I had the same problem with Android Studio 3.0.0 Beta 7
我在Android Studio 3.0.0 Beta 7
遇到了同样的问题
As stated here: https://developer.android.com/studio/run/index.html 如上所述: https : //developer.android.com/studio/run/index.html
Note: The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). 注意:“运行”按钮使用testOnly =“true”构建APK,这意味着APK只能通过adb(Android Studio使用)安装。 If you want a debuggable APK that people can install without adb, select your debug variant and click Build > Build APK(s). 如果您想要一个可以在没有adb的情况下安装的可调试APK,请选择您的调试版本,然后单击Build> Build APK(s)。
Same goes for release build, with Android Studio 3
you need to go to Build > Build APK(s)
to have a non testable release apk that you can submit to the store. 对于发布版本也是如此,使用Android Studio 3
您需要转到Build > Build APK(s)
以获得可以提交到商店的不可测试版本apk。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.