Android cannot build release APK using gradle build tool 3.0.0-alpha2

I have a problem with Android Studio 3 canary 2, generate an APK file which is always a TEST version and cannot install on any devices unless using the "adb install -t apkname" command.

Error Failure [INSTALL_FAILED_TEST_ONLY]

+3


source to share


1 answer


I had the same problem with Android Studio 3.0.0 Beta 7

As stated here: https://developer.android.com/studio/run/index.html



Note. The Run button creates an APK with testOnly = "true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug option and click Build> Build APK.

The same goes for the release build, with Android Studio 3

you need to go to Build > Build APK(s)

to have an untested apk release that you can submit to the store.

+1


source







All Articles