-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
在跑项目的时候几次遇到这个错误,简单记录以下。
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
android/gradle.properties
一定要加 MobSDK.spEdition=FP
android/build.gradle
两个 repositories 增加
maven { url "https://mvn.mob.com/android" }
maven { url 'https://developer.huawei.com/repo/'}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 增加
classpath 'com.mob.sdk:MobSDK:+'
}
android/app/build.gradle
MobSDK{
appKey "354444b3fe2c2"
appSecret "f6a17f7b8ebd4fc43043cb4b48552bf9"
MobPush{
devInfo {
//配置华为厂商推送
HUAWEI {
appId "104827325"
// 兼容 android 12 一定要配置 不然 就出现上面的问题
version "6.9.0.300"
}
// //配置小米厂商推送
XIAOMI {
appId "2882303761520067918"
appKey "5532006757918"
}
////
////
HONOR{
appId "您的应用对应的荣耀的APPID"// 荣耀平台注册的appid
}
// //配置魅族厂商推送
MEIZU {
appId "146855"
appKey "45c0765e286946b5a00d3a0d0a672231"
}
//配置OPPO厂商推送
OPPO {
appKey "b23f2b20038e4929a7cd62f2f31f362f"
appSecret "4c1c14b868d0406394c1604bfdf5967f"
}
//配置VIVO厂商推送
VIVO {
appId "105539354"
appKey "c6e6c7ddd9791f27950dc15e43dde33d"
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels