【发布时间】:2018-01-05 07:52:10
【问题描述】:
我正在学习 Firebase,但由于以下错误而陷入困境:
Error:Failed to resolve: com.android.support:customtabs:25.4.0
Error:Failed to resolve: com.android.support.constraint:constraint-layout:1.1.0-beta1
Error:Failed to resolve: com.android.support:design:25.4.0
Error:Failed to resolve: com.android.support:support-core-utils:25.4.0
Error:Failed to resolve: com.android.support:cardview-v7:25.4.0
我的 app/build.gradle 文件中的依赖项如下:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//Firebase
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.firebaseui:firebase-ui-auth:2.1.1'
testCompile 'junit:junit:4.12'
}
对于我的 app 文件夹外的 build.gradle 文件
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
我想问一下这些错误的解决方案是什么? 我一直在网上搜索有关这些错误的解决方案,但找不到可以解决我的问题的解决方案。
【问题讨论】:
-
清理-重建-运行
-
下载最新版本的支持 repo。清理、重建、运行。
-
我已将此行添加到我的依赖项中,编译
"com.android.support:support-core-utils:25.4.0"然后清理、重建、运行但仍然是相同的 @LunarWatcher -
有一些东西,比如你需要用 SDK 下载支持 repo
-
所以更新 SDK 中的支持 repo 就是我想说的
标签: android android-studio firebase dependencies firebaseui