问题:
D:\wzh\qdgs_ydbg_androidx\app\src\main\AndroidManifest.xml Error:
android:exported needs to be explicitly specified for <receiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
D:\wzh\qdgs_ydbg_androidx\app\src\main\AndroidManifest.xml Error:
android:exported needs to be explicitly specified for <receiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
D:\wzh\qdgs_ydbg_androidx\app\src\main\AndroidManifest.xml Error:
android:exported needs to be explicitly specified for <receiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
D:\wzh\qdgs_ydbg_androidx\app\src\main\AndroidManifest.xml Error:
android:exported needs to be explicitly specified for <receiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
D:\wzh\qdgs_ydbg_androidx\app\src\main\AndroidManifest.xml Error:
android:exported needs to be explicitly specified for <receiver>. 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
解决方法:
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
点击 --debug option 或 --run info 获取更多日志
找到如上图所示,没有配置 android:exported 属性的service,进行如下配置即可
友盟PUSH
<receiver
android:name="com.taobao.accs.EventReceiver"
android:exported="false" />
<receiver
android:name="com.taobao.accs.ServiceReceiver"
android:exported="false" />
<receiver
android:name="com.huawei.hms.support.api.push.PushMsgReceiver"
android:exported="false" />
<receiver
android:name="com.huawei.hms.support.api.push.PushReceiver"
android:exported="false" />
<receiver
android:name="com.meizu.cloud.pushsdk.MzPushSystemReceiver"
android:exported="false" />
blankj:utilcode
implementation 'com.blankj:utilcode:1.26.0'
<service
android:name="com.blankj.utilcode.util.MessengerUtils$ServerService"
android:exported="false" />