1. Error message
17:18 Gradle build finished in 2 s 904 ms
17:18 Failed to commit install session 1905086282 with command cmd package install-commit 1905086282. Error: INSTALL_FAILED_TEST_ONLY
17:18 Error
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Retry
17:18 Session 'app': Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Retry
2. Solution
1. Problem analysis
When you click to run the debugging program, it will be automatically generated in the application tab of the manifest file
android:testOnly="true"
Some mobile phones do not support the installation of such applications;
2. Solution 1
Under menu bar/build:
- Debug apps compiled with Build APK(s) can run;
- The debug version of the application compiled with Make Project can be run;
- Released apps packaged with Generate Signed APK signatures will also work;
3. Solution 2
Configure in gradle.properties
android.injected.testOnly=false