In project 'app' a resolved Google Play services library dependency depends on another at an exact version

后端 未结 22 1862
情话喂你
情话喂你 2020-12-08 13:42

Trying to create a simple app with FireStore and Google Authentication. Having problem with the gradle:

In project \'app\' a resolved Google Play serv

相关标签:
22条回答
  • 2020-12-08 14:12

    Add FCM to your App added Lower dependency Then I changed the dependency to the latest version this problem has solved.

    compile 'com.google.firebase:firebase-messaging:17.3.4'
    

    to

    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    
    0 讨论(0)
  • 2020-12-08 14:13

    i added the latest version of firebase messaging to build.gradle (Module: app) in my project and problem solved

    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    
    0 讨论(0)
  • 2020-12-08 14:13

    Updating all my Google Play Services libraries to the latest in ALL modules solved the issue for me. I don't see that you have any Google Play Services libraries, but I wanna leave this answer here to those that might find this useful.

    0 讨论(0)
  • 2020-12-08 14:13

    I just tried @live-love's accepted answer myself and agree with the approach.

    It might be more precise, however, to correct your dependencies according to the latest Google Services library version.

    For my case, it happened when I just added/activated a Firebase service to the app.

    You need to follow the latest version in project and Gradle app.

    My app/build.gradle

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        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'
        //Android Support Design Library
        implementation 'com.android.support:design:27.1.1'
        //RecyclerView
        implementation 'com.android.support:recyclerview-v7:27.1.1'
        // Support multidex
        implementation 'com.android.support:multidex:1.0.3'
        // Firebase Core
        // implementation 'com.google.firebase:firebase-core:16.0.1'
        //Firebase Authentication
        implementation 'com.google.firebase:firebase-auth:19.3.1'
        // Firestore Firestore
        implementation 'com.google.firebase:firebase-firestore:21.4.3'
        implementation 'com.google.firebase:firebase-analytics:17.2.2'
        // glide
        implementation 'com.github.bumptech.glide:glide:4.8.0'
        annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
    
        // Circle ImageView
        implementation 'de.hdodenhof:circleimageview:2.2.0'
    }
    apply plugin: 'com.google.gms.google-services'
    

    My project's build.gradle

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

    Don't forget to sync the Gradle again.

    0 讨论(0)
提交回复
热议问题