依赖项失败:io.grpc:grpc-auth:1.13.1-> io.grpc:grpc-core @ [1.13.1],但grpc-core版本为1.16.1

时间:2019-03-16 11:54:51

标签: android firebase android-gradle dependencies dialogflow

我正在开发同时使用Dialogflow和firestore的应用程序,但我不知道为什么,它向我显示此错误:

    ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.13.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: io.grpc:grpc-auth:1.13.1 -> io.grpc:grpc-core@[1.13.1], but grpc-core version was 1.16.1.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto io.grpc:grpc-netty-shaded@1.13.1
-- Project 'app' depends onto com.google.cloud:google-cloud-core-grpc@1.49.0
-- Project 'app' depends onto io.grpc:grpc-protobuf-lite@1.16.1
-- Project 'app' depends onto io.grpc:grpc-core@1.16.1
-- Project 'app' depends onto com.google.firebase:firebase-firestore@17.1.5
-- Project 'app' depends onto com.google.api:gax-grpc@1.32.0
-- Project 'app' depends onto io.grpc:grpc-protobuf@1.13.1
-- Project 'app' depends onto io.grpc:grpc-android@1.16.1
-- Project 'app' depends onto io.grpc:grpc-okhttp@1.16.1
-- Project 'app' depends onto com.google.cloud:google-cloud-dialogflow@0.67.0-alpha
-- Project 'app' depends onto io.grpc:grpc-auth@1.13.1
-- Project 'app' depends onto io.grpc:grpc-okhttp@1.13.1
-- Project 'app' depends onto io.grpc:grpc-stub@1.16.1

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.

当我添加“ implementation'com.google.firebase:firebase-firestore:17.1.5'”库时,就会发生这种情况。我有这个build.gradle:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.appv9"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    // Java V2
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/INDEX.LIST'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    // Dialogflow SDK dependencies
    implementation 'ai.api:sdk:2.0.7@aar'
    implementation 'ai.api:libai:1.6.12'

    // Java V2
    implementation 'com.google.cloud:google-cloud-dialogflow:0.67.0-alpha'
    // for Remote Procedure Call to avoid "No functional channel service provider found" error while creating SessionsClient
    implementation 'io.grpc:grpc-okhttp:1.13.1'

    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.google.firebase:firebase-auth:16.1.0'
    implementation 'com.google.firebase:firebase-firestore:17.1.5' 
    // Google Sign In SDK (only required for Google Sign In)
    implementation 'com.google.android.gms:play-services-auth:16.0.1'

}

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

还有一个:

// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

我不知道该怎么解决,因为如您所见,我的grpc是1.13.1版本,有人可以帮助我吗?非常感谢!

0 个答案:

没有答案