[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!

Read More: