android studio,不管调试还是release,在android12上都报错。

List of apks:
[0] '/Users/xxxx/Documents/Android/Test/app/build/outputs/apk/debug/test.apk'
Installation failed due to: 'Failed to commit install session 206588333 with command package install-commit 206588333. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl206588333.tmp/base.apk (at Binary XML file line #140): com.xyzlf.share.library.ShareHandlerActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
Retry
Failed to launch an application on all devices

 

 

上面的意思是android12需要加上android:exported 

然后就可以了。

 

详细说明,可以参考以下:

https://www.jianshu.com/p/c0472c7ed286

posted @ 2023-02-20 10:57  jiduoduo  阅读(877)  评论(0编辑  收藏  举报