java - 错误 : Manifest merger failed with multiple errors, 查看日志

标签 java android android-studio build.gradle

尝试在我的 Android 项目上安装 OneSignal 的 SDK 后,我注意到在编译时一直发生错误,这阻止了我开始使用该服务。

我的 build.grade(Module:app) 文件:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"

    defaultConfig {
        applicationId "com.sourcey.project"
        minSdkVersion 17
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    // maven central repository
    mavenCentral()

    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
    compile 'com.microsoft.azure.android:azure-storage-android:0.6.0@aar'
    compile 'com.android.support:design:24.2.1'
    compile 'com.google.firebase:firebase-core:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.google.android.gms:play-services:10.0.1'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
    compile 'com.afollestad.material-dialogs:core:0.9.1.0'
    compile 'com.afollestad.material-dialogs:commons:0.9.1.0'

    **compile 'com.onesignal:OneSignal:3.+@aar'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.google.android.gms:play-services-location:10.0.1'
    compile 'com.google.android.gms:play-services-analytics:10.0.1'**
//Without including these 4 rows, the project building process goes perfectly.


    testCompile 'junit:junit:4.12'
}


apply plugin: 'com.google.gms.google-services'

谢谢大家的帮助!

最佳答案

修复: 忘记添加-

  manifestPlaceholders = [onesignal_app_id: "PUT YOUR ONESIGNAL APP ID HERE",
                              // Project number pulled from dashboard, local value is ignored.
                              onesignal_google_project_number: "REMOTE"]

关于java - 错误 : Manifest merger failed with multiple errors, 查看日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40936071/

相关文章:

java - 快速排序 - 相等检查的原因

android - 如何将图像添加到 android studio 中的模拟器库?

android - 每行有不同列的 GridView

java - Android:Log.w() 错误:<identifier> 预期

java - 假设您只有类的字符串名称(以及方法名称/参数),如何从类调用静态方法 - 在 Java 中

Java:查找数组中 double 的平均值

android - 未发送 HttpGet 参数

java - processDebugManifest 错误 - Android Studio

ssl - 如何使用新的 GCM 密码套件在 Java 8 中启动握手

android - Chathead 的后台服务在小米 MI4I android 中不起作用