同步我的项目时,我遇到了多个“解析失败”问题。它们都与firebase和play-services有关。我确保它们都是相同的(11.2.0)。我还检查了它们的最新版本,都是11.2.0。此外,所有其他类似问题的答案都涉及更新SDK管理器中的Google play服务和存储库,但我的已经是最新的。
请问为什么我不能同步我的项目?
编辑 - 当前可行的解决方案
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
google()
移动到allprojects/repositories
。 - Bob Snydermaven { url "https://maven.google.com" }
来代替google()
。 - Bob Snyderallprojects/repositories
节点而不是仅在repositories
节点中吗? - rigotre