简体   繁体   English

Android无法使用gradle构建工具3.0.0-alpha2构建发布APK

[英]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.

相关问题 android gradle plugin 3.0.0-alpha2:错误膨胀类android.support.v4.widget.NestedScrollView - android gradle plugin 3.0.0-alpha2: Error inflating class android.support.v4.widget.NestedScrollView Android Studio 3.0 Canary 2:使用gradle 3.0.0-alpha2时无法应用插件 - Android Studio 3.0 Canary 2: Failed to apply plugin, when using gradle 3.0.0-alpha2 如何使用 Gradle 为 Android 构建发布测试 apk? - How to build a release test apk for Android with Gradle? 包含模块:不打算供其他组件使用-gradle:3.0.0-alpha2 - Module inclusion: not intended for consumption by other components - gradle:3.0.0-alpha2 似乎无法使用Xamarin Business for Android获得发布的APK版本 - Can't seem to get a release APK build with Xamarin Business for Android Android 构建 APK 发布 - Android build APK release 'com.android.tools.build:gradle:3.0.0-alpha3'和'com.android.tools.build:gradle:3.0.0-alpha1'有什么区别? - what is difference between 'com.android.tools.build:gradle:3.0.0-alpha3' and 'com.android.tools.build:gradle:3.0.0-alpha1'? 无法在发行版中构建APK - Can't build apk in release version 反应原生 android APK 发布构建失败 gradle - React native android APK release build failed gradle 找不到用于方法[com.android.tools.build:gradle:3.0.0-alpha3]的方法classpath() - Could not find method classpath() for arguments [com.android.tools.build:gradle:3.0.0-alpha3]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM