Skip to content

android:exported报错 #12

@a521wangandroid

Description

@a521wangandroid

报错内容
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' 认为可以升级这个依赖版本来解决,请作者作为参考进行升级

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions