Android12 installation error: Targeting S+ (version 31 and above) requires that an explicit value for android:export

1. Error report:

adb: failed to install out/target/product/blueline/testcases/AudioDemo/arm64/AudioDemo.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1547233782.tmp/base.apk (at Binary XML file line #21): com.test.audiodemo.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]

2. Solve

1.在AndroidManifest.xml增加android:exported="true"
# emacs AndroidManifest.xml
<activity android:name=".MainActivity"
+	      android:exported="true"
	      >

Guess you like

Origin blog.csdn.net/u010164190/article/details/126394700