firestore和Google照片之间存在冲突

时间:2019-05-12 07:54:36

标签: android gradle

将Google相册添加到gradle文件后,我遇到以下错误。 Firestore依赖性已添加。一旦我添加谷歌照片以下错误发生。请帮助。

错误:在项目“应用”中,已解析的Google Play服务库依赖项依赖于另一个版本(例如“ [1.10。     1]”,但尚未解决该版本。该库显示的行为将是未知的。

Dependency failing : io.grpc : grpc - auth : 1.10.1->io.grpc : grpc - core@[1.10.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 - core@1.16.1
--Project 'app' depends onto io.grpc:grpc - protobuf@1.10.1
--Project 'app' depends onto com.google.firebase:firebase - firestore@18.2.0
--Project 'app' depends onto io.grpc:grpc - auth@1.10.1
--Project 'app' depends onto io.grpc:grpc - protobuf - lite@1.16.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.api:gax - grpc@1.29.0
--Project 'app' depends onto com.google.photos.library:google - photos - library - client@1.1.0
--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-服务-插件,并通过在您的b中添加“ googleServices {disableVersionCheck = false}”来禁用 uild.gradle文件。

Build.gradle(Module:app)

apply plugin : 'com.android.application'

android{
    compileSdkVersion 28
    defaultConfig{
    applicationId "com.savera.nammaflat"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes{
    release{
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies{
    implementation 'com.android.support:support-v4:28.0.0'
    /*https://stackoverflow.com/questions/55546885/google-api-client-android-and-firestore-is-giving-dexarchivemergerexception-buil*/
    configurations{
    all*.exclude module : 'guava-jdk5'
}
implementation fileTree(include: ['*.jar'], dir : 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation('com.android.support:design: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'

//Google sheets
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'pub.devrel:easypermissions:2.0.1'
implementation('com.google.api-client:google-api-client-android:1.23.0') {
    exclude group : 'org.apache.httpcomponents'
        exclude group : 'com.google.common.annotations'
}

// Google photos
implementation 'com.google.photos.library:google-photos-library-client:1.1.0'


// Firebase Authentication
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation('com.google.firebase:firebase-firestore:18.2.0') {
    exclude group : 'com.google.common.annotations'
}
implementation 'com.google.firebase:firebase-auth:17.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'


}

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

BUILD.gradle(PROJECT)

// 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.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.2.0'
    }
}

allprojects{
    repositories{
    google()
    jcenter()

}
}

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

1 个答案:

答案 0 :(得分:0)

无法解决此依赖项冲突问题。尝试了几种方法,但无法解决问题。而不是使用 // Google照片 实施'com.google.photos.library:google-photos-library-client:1.1.0'

我使用了Google Photos Rest API + Volley。一切正常。