Tag Archives: APK Install Error

[Solved] Android-android studio apk Install Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

I simply wrote a program today and found that it could not run all the time, prompting that the installation failed on the physical device

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
Installation failed due to: ‘null’

After checking on the Internet, most of the brothers said that it was a problem with the test mark, so just add it

android:testOnly="false"

But there are still problems after trying

Another brother said that this problem is related to the manifest file. It may be that there is a problem with the configuration of the manifest file. Therefore, I checked it from here. However, I was also very curious about how a hello world program has a configuration problem. I didn’t see any exceptions in the xml. I went to the apk generation directory to directly try to install it:

adb install -r -d a.apk

here I saw the error messages:

adb: failed to install app-debug.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl631790294.tmp/base.apk (at Binary XML file line #20): com.leonard.goot.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

Find the problem, because the activity does not have the export property caused by the modification can be installed after debugging, Done!

APK Install Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]

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