我正在尝试将Firebase连接到我的项目。但是当项目同步后,我反复遇到这些错误。请帮助我解决此问题。
Download https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom
Download https://jcenter.bintray.com/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom
sync failed 47s 272ms Run build 45s 783ms Load build 1s 336ms Configure build 44s 341ms Load projects 83ms rootProject 127ms Configure project : 44s 90ms Apply plugin org.gradle.help-tasks Apply script build.gradle 44s 83ms Resolve dependencies of :classpath 43s 860ms Download dl.google.com/dl/android/maven2/com/google/gms/google-services/… 21s 18ms Download jcenter.bintray.com/com/google/gms/google-services/4.0.1/… 21s 2ms
答案 0 :(得分:0)
在成绩文件中,您需要为以下存储库添加google()。如果已经存在,则需要将其移至存储库中。(google()应该在jcenter()之前存在)。我也面临同样的问题,这就是我解决的方法。 Could not find play-services-basement.aar
allprojects {
repositories {
google()
jcenter()
}
}