Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android:exported报错 #11

Open
a521wangandroid opened this issue Apr 9, 2024 · 0 comments
Open

android:exported报错 #11

a521wangandroid opened this issue Apr 9, 2024 · 0 comments

Comments

@a521wangandroid
Copy link

报错内容
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined
报错原因:
如果 AndroidManifest.xml 注册的 activity、activity-alias、service 或者 broadcast receiver 组件有 intent-filter 属性,必须显式设置 android:exported 的值,否则应用将无法安装。
解决方法:
第一处,代码中改为


            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
第二处: 我目前注释掉了 implementation 'com.squareup.leakcanary:leakcanary-android:1.6.3' 认为可以升级这个依赖版本来解决,请作者作为参考进行升级
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant