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
Read More:
- [Solved] Android-android studio apk Install Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
- [Solved] Android Studio APK install Error: INSTALL_FAILED_CONFLICTING_PROVIDER
- Apk Failed to install Error: [install\u failed\verification\u failure]
- Android Studio: How to Solve APK error in mobile phone installation
- Ionic3 update open apk android 8.0 error FileUriExposedException
- Using Jenkins to compile APK Error [How to Solve]
- [Solved] Android Studio Compile Error: Invalid main APK outputs : EarlySyncBuildOutput
- Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- [Solved] Unity packaged and exported apk error: Failed to load libmain.so’
- [Solved] Flutter package flutter build apk Error: permission-handle
- [Solved] Android Studio 3.0 Error: Error: INSTALL_FAILED_TEST_ONLY
- [Solved] Android Studio Generate APK Error: error_prone_annotations.jar (com.google.errorprone:error)
- How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- Puppeteer Error: Chromium revision is not downloaded. Run “npm install“ or “yarn install“
- [Solved] npm install sass@~1.32 sass-loader deepmerge -D Install Error
- [Solved] Phone Debug Program Error: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- [Solved] Unity Package Error: FAILURE: Build failed with an exception.
- Yarn install error: 00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: ‘install‘
- [Solved] Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and
- [Solved] JDBC error: Communications link failure