Android12安装报错:Targeting S+ (version 31 and above) requires that an explicit value for android:export

1.报错:

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.解决

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

猜你喜欢

转载自blog.csdn.net/u010164190/article/details/126394700