以下是我得到的错误,请帮助我!
错误:无法解析“:app@debug/compileClasspath”的依赖关系:
无法解析 com.google.firebase:firebase-core:17.2.0。
错误:无法解析“:app@debug/compileClasspath”的依赖关系:
无法解析 com.google.firebase:firebase-config:19.0.3。
错误:无法解析“:app@debug/compileClasspath”的依赖关系:
无法解析 com.google.android.gms:play-services-measurement-base:[17.2.0]。
错误:无法解析“:app@debug/compileClasspath”的依赖关系:
无法解析 com.google.android.gms:play-services-measurement-impl:[17.2.0]。
错误:无法解析“:app@debug/compileClasspath”的依赖关系:
无法解析 com.google.android.gms:play-services-measurement-sdk-api:[17.2.0]。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:
无法解析 com.google.firebase:firebase-core:17.2.0。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:
无法解析 com.google.firebase:firebase-config:19.0.3。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:
无法解析 com.google.android.gms:play-services-measurement-base:[17.2.0]。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:
无法解析 com.google.android.gms:play-services-measurement-impl:[17.2.0]。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:无法解析com.google.android.gms:play-services-measurement-sdk-api:[17.2.0]。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析com.google.firebase:firebase-core:17.2.0。
错误:无法解析 ':app@debugUnitTest/compileClasspath' 的依赖关系:无法解析 com.google.firebase:firebase-config:19.0.3。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析com.google.android.gms:play-services-measurement-base:[17.2.0]。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析com.google.android.gms:play-services-measurement-impl:[17.2.0]。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析com.google.android.gms:play-services-measurement-sdk-api:[17.2.0]。
//app level build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.hfad.firebaselinkedin"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-config:19.0.3'
implementation 'com.google.firebase:firebase-auth:19.1.0'
}
apply plugin: 'com.google.gms.google-services'
//project level build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}