問題描述
在同步我的項目時,我遇到了多個無法解決"問題.它們都與 firebase 和 play-services 相關(guān).我確保它們都是相同的(11.2.0).我也檢查過,兩者的最新版本都是 11.2.0.此外,類似問題的所有其他答案都涉及更新 SDK 管理器中的 Google Play 服務(wù)和存儲庫,但我的已經(jīng)是最新的.
I'm getting multiple "Failed to Resolve" issues when syncing my project. They are all firebase and play-services related. I made sure they are all the same (11.2.0). I've also checked and the latest version for both is 11.2.0. Also, all the other answers to similar questions involve updating Google play services and repository in the SDK Manager but mine is already up to date.
知道為什么我不能同步我的項目嗎?
Any idea why I can't sync my project?
編輯 - 當(dāng)前工作解決方案
// 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
}
推薦答案
將 maven { url "https://maven.google.com" }
添加到您的根級別 build.gradle
文件
Add maven { url "https://maven.google.com" }
to your root level build.gradle
file
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
這篇關(guān)于無法解決:com.google.firebase:firebase-core:11.2.0的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!