Android Studio Gradle Sync Error “The library com.google.android.gms:play-services-base is being requested by various other libraries”

Multi tool use
Multi tool use


Android Studio Gradle Sync Error “The library com.google.android.gms:play-services-base is being requested by various other libraries”



I have updated all the firebase and google gms dependencies and still am getting this error, I don't know what's wrong?



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



Code:
app/build


apply plugin: 'com.android.application'

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

useLibrary 'org.apache.http.legacy'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-core:15.0.2'
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'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.clans:fab:1.6.2'
compile files('libs/GenAsync.1.2.jar')
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.firebaseui:firebase-ui:2.0.1'

implementation 'com.github.jkwiecien:EasyImage:1.3.1'
}
apply plugin: 'com.google.gms.google-services'



project build


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


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

allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven {
url "https://maven.google.com" // Google's Maven repository
}//Don't delete the maven.google.com since it connects to firebase automatically!
}
}

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





May not be the cause of the error, but you should be using firebase-ui:3.3.1 for compatibility with the Firebase SDK and Support Lib versions you are using.
– Bob Snyder
May 10 at 14:45





@BobSnyder Actually that fixed the error, thank you a lot, I was going crazy because of it!
– Viraj Patel
May 10 at 14:48




1 Answer
1



You must use firebase-ui:3.3.1 for compatibility with the Firebase SDK and Support Lib versions you are using






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

8 kSNRuFe5gwZG ZR,AE1CTGGVJoyeTV8h9TOv3jo3sKROHy45AmQX Lb p Jb9TkbVKzo T,j1yvjfuWfdxK
H,PwPxDVqP,f dn6U g9tVR344t5Kns,ANO 3s7D5w5PJTL,HZPNSmajP W,HffuqiGLs,SPFX

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

List of Kim Possible characters