如何解决无法更改配置的依赖关系':app:api'之后它被包含在依赖性解析中

时间:2018-05-06 12:09:21

标签: android firebase gradle build.gradle firebaseui

我在更新gradle和firebase版本后遇到上述错误。

App build gradle文件是

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.google.dagger:dagger:2.10'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
    compile 'co.chatsdk.chatsdk:chat-sdk-core:4.0.8'
    compile 'co.chatsdk.chatsdk:chat-sdk-ui:4.0.8'
    compile 'co.chatsdk.chatsdk:chat-sdk-firebase-adapter:4.0.8'
    compile 'co.chatsdk.chatsdk:chat-sdk-firebase-file-storage:4.0.8'
    compile 'com.google.firebase:firebase-invites:15.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:design:27.1.0'
    compile 'com.android.support:support-v4:27.1.0'
    compile 'com.google.firebase:firebase-core:15.0.0'
    compile 'com.google.firebase:firebase-auth:15.1.0'
    compile 'com.google.firebase:firebase-database:15.0.1'
    compile 'com.google.firebase:firebase-crash:15.0.2'
    compile 'com.google.firebase:firebase-config:15.0.2'
    compile 'com.firebaseui:firebase-ui-database:3.3.1'
    compile 'de.hdodenhof:circleimageview:2.2.0'
    compile 'com.google.firebase:firebase-storage:15.0.2'
    compile 'com.github.bumptech.glide:glide:4.0.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.google.code.gson:gson:2.5.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.orhanobut:dialogplus:1.11@aar'
    compile 'com.github.clans:fab:1.5.4'
    compile 'com.google.firebase:firebase-messaging:15.0.2'
    compile 'com.basgeekball:awesome-validation:4.1'
    compile 'com.google.firebase:firebase-ads:15.0.1'
    compile 'com.getkeepsafe.taptargetview:taptargetview:1.11.0'
    compile 'com.android.billingclient:billing:1.0'
    compile 'com.github.javiersantos:MaterialStyledDialogs:2.1'
    compile 'com.android.support.constraint:constraint-layout:+'
    compile 'co.chatsdk.chatsdk:chat-sdk-firebase-push:4.0.8'
    compile 'com.stepstone.stepper:material-stepper:4.3.1'
    compile 'com.android.support:animated-vector-drawable:27.1.0'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
    debugCompile 'com.amitshekhar.android:debug-db:1.0.1'
    implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
    implementation 'com.google.android.gms:play-services-measurement-base:15.0.1'
}


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

项目gradle文件是

buildscript {
    ext.kotlin_version = '1.1.60'
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.3.0'
        classpath 'com.google.android.gms:strict-version-matcher-plugin:1.0.0'

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    }
}

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        google()
        maven {
            url "https://jitpack.io"
        }
        maven { url "https://maven.google.com" }
        maven { url "http://dl.bintray.com/chat-sdk/chat-sdk-android" }

        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

根据最近的更改https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html firebase依赖项可以有不同的版本。

如何解决这个问题?

0 个答案:

没有答案