0
点赞
收藏
分享

微信扫一扫

android S android:exported

敬亭阁主 2022-04-06 阅读 70
android

        <receiver
            android:name=".BootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

需要显示声明 android:exported 属性

修改为以下:

        <receiver
            android:name=".BootReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

参考:

Android 12 行为变更,对应用产生的影响 - 知乎

举报

相关推荐

0 条评论