I am having issues installing an apk to my device.
adb install <.apk>
Using the above command returns the following:
5413 KB/s (99747 bytes in 0.017s)
pkg: /data/local/tmp/AppClient.TestOnly.App3.apk
Failure [INSTALL_FAILED_TEST_ONLY]
Any idea on what might cause this issue?
It definitely recognizes the device. Could it be an issue with the apk?
In my case this mistake was in unstable gradle version. Just use a stable version of gradle (not alpha, not even beta). And it was fixed for me
Android studio 3.0 generates test only APK.
I have solved the issue by adding the "android:testOnly" property to android manifest's tag.
And then generated the APK by Android studio3.0 menu:Build-->Build APK(s).
More Info: https://commonsware.com/blog/2017/10/31/android-studio-3p0-flag-test-only.html
Build your distribution .apk from Android Studio as follow
Build --> Build Apk(s) (for unsigned build) Build --> Generate Signed APK ( for signed build)
These option builds the APK with android:testOnly="false" option which allows you to install the APK expicitly into device by the commond.
adb install yourBuilT.apk
I see the accepted answer but you dont have to actually push the apk and then run the command on adb shell direct adb install with -t flag actually works
attaching a screenshot for reference