Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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".

The error is Failure [INSTALL_FAILED_TEST_ONLY]

like image 287
Vinh.TV Avatar asked Dec 08 '25 08:12

Vinh.TV


1 Answers

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 builds 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 variant and click 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.

like image 177
Gabriel Morin Avatar answered Dec 09 '25 22:12

Gabriel Morin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!