How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

When installing a debug package, the prompt is as follows

C:\Users\test>adb install "C:\Users\test\Downloads\test.apk"
Performing Streamed Install
adb: failed to install C:\Users\test\Downloads\test.apk: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

Solution:

adb install -t "C:\Users\test\Downloads\test.apk"

ADB install has lrtsdg six options

-L lock the application
– R replace the existing application, that is, force installation
– t allow the test package
– s to install the application on the SD card
– D allow it to be installed, that is, the installed version is lower than that on the mobile phone
– G grant all runtime permissions to the application

Read More: