Android ';无法解析所有依赖项..';解析Firebase身份验证时出错
我在包含Firebase Auth库时遇到此错误。只有在我包含Firebase auth 11.8.0时才会出现此错误。一旦删除该选项,gradle将成功构建。我使用的版本是否不兼容 Gradle:Android ';无法解析所有依赖项..';解析Firebase身份验证时出错,android,firebase,gradle,firebase-authentication,Android,Firebase,Gradle,Firebase Authentication,我在包含Firebase Auth库时遇到此错误。只有在我包含Firebase auth 11.8.0时才会出现此错误。一旦删除该选项,gradle将成功构建。我使用的版本是否不兼容 Gradle: apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.company.myapp" minS
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.company.myapp"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def googleSupportVersion = '26.1.0'
def googlePlayServicesVersion = '11.8.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$googleSupportVersion"
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'
compile "com.google.firebase:firebase-core:$googlePlayServicesVersion"
compile "com.google.firebase:firebase-auth:$googlePlayServicesVersion"
compile "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"
}
apply plugin: 'com.google.gms.google-services'
Error:Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.google.firebase:firebase-auth:11.8.0
Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth/11.8.0/firebase-auth-11.8.0.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth/11.8.0/firebase-auth-11.8.0.aar'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
unable to find valid certification path to requested target
以及:
错误:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.company.myapp"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def googleSupportVersion = '26.1.0'
def googlePlayServicesVersion = '11.8.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$googleSupportVersion"
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'
compile "com.google.firebase:firebase-core:$googlePlayServicesVersion"
compile "com.google.firebase:firebase-auth:$googlePlayServicesVersion"
compile "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"
}
apply plugin: 'com.google.gms.google-services'
Error:Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.google.firebase:firebase-auth:11.8.0
Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth/11.8.0/firebase-auth-11.8.0.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-auth/11.8.0/firebase-auth-11.8.0.aar'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
unable to find valid certification path to requested target
看起来你在下载时遇到了问题:“无法获取资源”,“无法前进”。@DougStevenson我也在不同的网络上尝试过。只有当我尝试下载firebase auth depen时才会发生这种情况。对不起,我不知道是什么问题。我已经使用firebase auth 11.8.0一个多月了,我以前从未听说过这一点。@DougStevenson感谢Doug。那么它与firebase auth无关。我会继续找的