同步我的项目时,我遇到了多个“无法解决”问题。它们都与 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
}
原文由 rigotre 发布,翻译遵循 CC BY-SA 4.0 许可协议
将
maven { url "https://maven.google.com" }
添加到您的根级别build.gradle
文件