FirebaseUI身份验证错误:未能解析:com.android.support:xxx:26.0.1
我正在尝试将FirebaseUI Auth添加到我的项目中,但我一直无法同步,如下所示:FirebaseUI身份验证错误:未能解析:com.android.support:xxx:26.0.1,android,maven,firebase,gradle,firebase-authentication,Android,Maven,Firebase,Gradle,Firebase Authentication,我正在尝试将FirebaseUI Auth添加到我的项目中,但我一直无法同步,如下所示: Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not find com.android.support:appcompat-v7:26.0.1. Required b
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.android.support:appcompat-v7:26.0.1.
Required by:
project :app
> Could not find com.android.support:support-compat:26.0.1.
Required by:
project :app
> Could not find com.android.support.constraint:constraint-layout:1.1.0-beta1.
Required by:
project :app
> Could not find com.android.support:design:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:customtabs:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support.constraint:constraint-layout:1.1.0-beta1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:cardview-v7:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:appcompat-v7:26.0.1.
Required by:
project :app > com.google.android.gms:play-services:11.0.4 > com.google.android.gms:play-services-cast:11.0.4 > com.android.support:mediarouter-v7:25.2.0
> Could not find com.android.support:support-compat:26.0.1.
Required by:
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-cast:11.0.4 >
com.android.support:mediarouter-v7:25.2.0 > com.android.support:palette-v7:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-media-
compat:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-core-utils:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-core-ui:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-fragment:25.2.0
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.chalker.chalker"
minSdkVersion 23
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.1'
compile "com.android.support:support-compat:26.0.1"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
我的应用程序级别build.gradle如下所示:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.android.support:appcompat-v7:26.0.1.
Required by:
project :app
> Could not find com.android.support:support-compat:26.0.1.
Required by:
project :app
> Could not find com.android.support.constraint:constraint-layout:1.1.0-beta1.
Required by:
project :app
> Could not find com.android.support:design:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:customtabs:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support.constraint:constraint-layout:1.1.0-beta1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:cardview-v7:26.0.1.
Required by:
project :app > com.firebaseui:firebase-ui-auth:2.3.0
> Could not find com.android.support:appcompat-v7:26.0.1.
Required by:
project :app > com.google.android.gms:play-services:11.0.4 > com.google.android.gms:play-services-cast:11.0.4 > com.android.support:mediarouter-v7:25.2.0
> Could not find com.android.support:support-compat:26.0.1.
Required by:
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-cast:11.0.4 >
com.android.support:mediarouter-v7:25.2.0 > com.android.support:palette-v7:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-media-
compat:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-core-utils:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-core-ui:25.2.0
project :app > com.google.android.gms:play-services:11.0.4 >
com.google.android.gms:play-services-basement:11.0.4 >
com.android.support:support-v4:25.2.0 > com.android.support:support-fragment:25.2.0
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.chalker.chalker"
minSdkVersion 23
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.1'
compile "com.android.support:support-compat:26.0.1"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
以及我的项目级build.gradle:
buildscript {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我在这里读到了类似的问题,并为其他人提出了解决问题的建议,但我就是无法让我的建议发挥作用。。。
提前谢谢你的帮助!
Viktor在项目级build.gradle中,移动此块:
maven {
url "https://maven.google.com"
}
从buildscript/repositories
到allprojects/repositories
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
在项目级build.gradle中,移动此块:
maven {
url "https://maven.google.com"
}
从buildscript/repositories
到allprojects/repositories
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
非常感谢您的快速回答,解决了问题!非常感谢您的快速回答,解决了问题!