Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobSDK 2023.xxxxx 集成教程最新 解决不少问题 #39

Open
dev-zl opened this issue Mar 31, 2023 · 0 comments
Open

MobSDK 2023.xxxxx 集成教程最新 解决不少问题 #39

dev-zl opened this issue Mar 31, 2023 · 0 comments

Comments

@dev-zl
Copy link

dev-zl commented Mar 31, 2023

在跑项目的时候几次遇到这个错误,简单记录以下。

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"
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant