-1

I am setting up fire base cloud messaging plugin with my Android application. I am facing dependency issue. Error is given below description.

"The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.3.0,16.3.0], [16.4.0,16.4.0]], but resolves to 16.4.0. Disable the plugin and check your dependencies tree using ./gradlew: app: dependencies."

Module App gradle File: 

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:animated-vector-drawable:26.1.0'
implementation 'com.android.support:support-v4:26.0.1'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-annotations:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.bumptech.glide:glide:3.7.0'    
implementation project(':lib')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso- 
core:3.0.1'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.patrickpissurno:ripple-effect:1.3.1'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.5.0'
}
apply plugin: 'com.google.gms.google-services'

Project Gradle File:

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'   
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'       
}

I expect to sync and build my Android project successfully.After that I will be able to implement FCM in my project.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Umair Ali
  • 11
  • 3
  • Possible duplicate of [com.google.android.gms:play-services-measurement-base is being requested by various other libraries](https://stackoverflow.com/questions/50577437/com-google-android-gmsplay-services-measurement-base-is-being-requested-by-vari) – Zoe May 12 '19 at 10:52

1 Answers1

0

Alike this it builds:

dependencies {
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:animated-vector-drawable:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-annotations:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'

    implementation 'com.google.android.gms:play-services-base:16.1.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-ads:17.2.0'

    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'

    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.patrickpissurno:ripple-effect:1.3.1'
    implementation 'com.android.volley:volley:1.1.1'

    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'
}
Martin Zeitler
  • 1
  • 19
  • 155
  • 216