[英]'Could not resolve all dependencies..' error when resolving Firebase Auth
包括Firebase Auth库时出现此错误。 仅当我包含Firebase auth 11.8.0时才会出现此错误。 删除后,gradle将成功构建。 我使用的版本不兼容吗?
摇篮:
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'
和:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
错误:
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.