When using the AS autorun, the test APK: app-debug.apk will be automatically generated under the app\build\outputs\apk\debug folder.
Use the command adb install app-debug.apk reports an error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
Solution:
1. Add the -t parameter: Enter the command adb install -t app-debug.apk
2. In the gradle.properties (project root or gradle global configuration directory ~/.gradle/) file add
android.injected.testOnly=false
Causes.
Android Studio 3.0 will automatically add the android:testOnly=”true” property to the application tag of the debug apk’s manifest file