Today after updating the play services in root folder I'm facing the following problem . I'm confused how to fix this.
Can anyone please help me to fix this ?
This error is irritating a lot. I don't know where's the conflict. By the way why it's showing conflict while no versions are interrelated.
Error :
The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.0,15.0.0], [15.0.2,15.0.2]], but resolves to 15.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
build.gradle script :
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "community.infinity"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
preDexLibraries false
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard- android.txt'), 'proguard-rules.pro'
}
debug {
ext.enableCrashlytics = false
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support'
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'appcompat-v7'
})
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.adamstyrc.cookiecutter:cookie-cutter:1.0.2'
implementation 'com.allattentionhere:fabulousfilter:0.0.5'
implementation 'com.github.florent37:diagonallayout:1.0.6'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.vstechlab.easyfonts:easyfonts:1.0.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.github.pwittchen:swipe:0.1.0'
implementation 'com.thesurix.gesturerecycler:gesture-recycler:1.4.0'
implementation 'com.github.iammert:MaterialIntroView:1.6.0'
implementation 'com.github.oxoooo:touch-image-view:1.0.1'
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
implementation('io.socket:socket.io-client:0.8.3') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
implementation 'com.google.gms:google-services:3.3.0'
implementation 'com.iceteck.silicompressorr:silicompressor:2.1'
implementation 'com.fenchtose.nocropper:nocropper:0.2.0'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation('com.google.guava:guava:23.4-android') {
exclude group: 'com.android.support'
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.github.madrapps:pikolo:1.1.6'
implementation 'jp.wasabeef:richeditor-android:1.2.2'
implementation 'com.android.support:palette-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation('com.github.bumptech.glide:glide:4.4.0') {
transitive = true
}
implementation ("com.github.bumptech.glide:recyclerview-integration:4.4.0") {
// Excludes the support library because it's already included by Glide.
transitive = false
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation "me.leolin:ShortcutBadger:1.1.21@aar"
implementation 'com.hbb20:ccp:2.1.2'
}
Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.
Update the google play gradle plugin version to latest version, currently 3.3.0.
and update the libraries to the latest version.
Also as reported use at least the version 15.0.2:
One of your dependency is having different version of
com.google.android.gms
.Update
Update
com.google.gms:google-services
Update Firebase dependencies to Latest Versions
Firebase dependency versions can be individual. So check Latest Versions.
Orignal Solution (Useful)
Ways to resolve:
com.google.android.gms
from conflicted dependency.com.google.android.gms
version as conflicted version.Problem
how to see which dependency is using
com.google.android.gms
?1. Solution by command
For Android, use this line
or if you have a gradle wrapper:
where
app
is your project module.Additionally, if you want to check if something is
compile
vs.testCompile
vsandroidTestCompile
dependency as well as what is pulling it in:2 Use these plugins
Gradle View is an Android Studio plugin that you can install and show dependency hierarchy. Methods Count is another plugin, it also shows dependency tree.
I ran into this problem and found my solution in this section https://firebase.google.com/support/release-notes/android#20180508
This indicates that not all firebase dependencies have the same version numbers for the current build. So you need to update each one independently. My final configuration looked like this:
Hope you can see the difference and new update as a result of google service plugin 3.3.0
Firebase components can now have independent versions (see latest release notes: https://firebase.google.com/support/release-notes/android)
What is likely happening is one of your other dependencies is pulling in multiple versions of your com.google.firebase:* dependencies beyond your explicit dependencies onto
You may be able to solve this specific problem by moving your dependency of firebase-messaging to 15.0.2.
Need to use core library component together with other firebase components:
Hi If you're facing ""Unfortunately, Google play services has been stopped" then, you can take this guide that I followed when I faced the error that you're facing right now on your Android device. Hope, it helps you. Click here