getui-flutter-plugin
getui-flutter-plugin copied to clipboard
targetSdkVersion=31时,不能打包
当使用targetSdkVersion = 31 编译时提示错误信息“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.
”
经过检查清单文件发现,部分带有intent-filter的receiver和service没有添加android:exported
,如下:
`<receiver
android:name="com.huawei.hms.support.api.push.PushMsgReceiver"
android:permission="com.cscec.odin.smartodin.permission.PROCESS_PUSH_MSG"
android:directBootAware="true">
<intent-filter>
<action
android:name="com.huawei.intent.action.PUSH_DELAY_NOTIFY" />
<action
android:name="com.huawei.intent.action.PUSH" />
</intent-filter>
</receiver>
<receiver
android:name="com.huawei.hms.support.api.push.PushReceiver"
android:permission="com.cscec.odin.smartodin.permission.PROCESS_PUSH_MSG"
android:directBootAware="true">
<intent-filter>
<action
android:name="com.huawei.android.push.intent.REGISTRATION" />
<action
android:name="com.huawei.android.push.intent.RECEIVE" />
</intent-filter>
</receiver>
<receiver
android:name="com.igexin.sdk.PushReceiver">
<intent-filter>
<action
android:name="android.intent.action.BOOT_COMPLETED" />
<action
android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action
android:name="android.intent.action.USER_PRESENT" />
<action
android:name="android.intent.action.MEDIA_MOUNTED" />
<action
android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action
android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
</intent-filter>
</receiver>
<receiver
android:name="com.meizu.cloud.pushsdk.SystemReceiver"
android:process=":pushservice">
<intent-filter>
<action
android:name="com.meizu.cloud.pushservice.action.PUSH_SERVICE_START" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<receiver
android:name="com.igexin.sdk.FlymePushReceiver"
android:process=":pushservice">
<intent-filter>
<action
android:name="com.meizu.flyme.push.intent.MESSAGE" />
<action
android:name="com.meizu.flyme.push.intent.REGISTER.FEEDBACK" />
<action
android:name="com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK" />
<action
android:name="com.meizu.c2dm.intent.REGISTRATION" />
<action
android:name="com.meizu.c2dm.intent.RECEIVE" />
<category
android:name="com.cscec.odin.smartodin" />
</intent-filter>
</receiver>
<service
android:name="com.igexin.sdk.OppoPushService"
android:permission="com.coloros.mcs.permission.SEND_MCS_MESSAGE"
android:process=":pushservice">
<intent-filter>
<action
android:name="com.coloros.mcs.action.RECEIVE_MCS_MESSAGE" />
</intent-filter>
</service>
<service
android:name="com.igexin.sdk.OppoAppPushService"
android:permission="com.heytap.mcs.permission.SEND_PUSH_MESSAGE"
android:process=":pushservice">
<intent-filter>
<action
android:name="com.heytap.mcs.action.RECEIVE_MCS_MESSAGE" />
<action
android:name="com.heytap.msp.push.RECEIVE_MCS_MESSAGE" />
</intent-filter>
</service>
<receiver
android:name="com.igexin.sdk.VivoPushMessageReceiver"
android:process=":pushservice">
<intent-filter>
<action
android:name="com.vivo.pushclient.action.RECEIVE" />
</intent-filter>
</receiver>`