How to resolve "Unable to resolve dependency" error?

D

Daniel Spatz

Guest
I suddenly get this error and I don't know how to resolve this. I already tried all suggestions here Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve but nothing worked for me

ERROR: Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.google.android.gms:play-services-measurement-base:[17.2.0].
Show Details
Affected Modules: app

ERROR: Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.google.android.gms:play-services-measurement-impl:[17.2.0].
Show Details
Affected Modules: app

...


Here is my build.gradle (Project):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
jcenter()
mavenLocal()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:4.3.2'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.6'
classpath 'com.google.firebase:perf-plugin:1.3.1' // Performance Monitoring plugin

}
}

allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }

}
}

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


Here is my build.gradle (App):

...


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'

...
}

apply plugin: 'com.google.gms.google-services' // Google Play services Gradle plugin



Also the misc.xml file has been changed automatically (the language level has been updated). Maybe this has something to do with the error.

Also in the SDK manager the SDK 29 is displayed as partially installed although there is nothing else I can Install for this SDK.

How can I resolve this?

Continue reading...
 
Top