无法解决:play-services-flags [英] Failed to resolve: play-services-flags
问题描述
今天,由于配置问题,Android Studio停止了正常同步.
Today, Android Studio stopped to sync properly due to configuration issues.
无法解析配置:app:providerRepositoryDebugCompileClasspath"的所有文件. 找不到firebase-analytics-impl.aar(com.google.firebase:firebase-analytics-impl:15.0.2). 在以下位置搜索: https ://jcenter.bintray.com/com/google/firebase/firebase-analytics-impl/15.0.2/firebase-analytics-impl-15.0.2.aar 找不到play-services-flags.aar(com.google.android.gms:play-services-flags:15.0.1). 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-flags/15.0.1/play-services-flags-15.0.1.aar
Could not resolve all files for configuration ‘:app:providerRepositoryDebugCompileClasspath’. Could not find firebase-analytics-impl.aar (com.google.firebase:firebase-analytics-impl:15.0.2). Searched in the following locations: https://jcenter.bintray.com/com/google/firebase/firebase-analytics-impl/15.0.2/firebase-analytics-impl-15.0.2.aar Could not find play-services-flags.aar (com.google.android.gms:play-services-flags:15.0.1). Searched in the following locations: https://jcenter.bintray.com/com/google/android/gms/play-services-flags/15.0.1/play-services-flags-15.0.1.aar
这两个文件存在,我可以通过网络浏览器下载它们.
These two files exist, and I can download them through web browser.
我已通过将Firebase Core更新为16.0.0修复了第一期问题. (无法解决:firebase-analytics-impl),但我无法修复第二个.
I have fixed first issue by updating firebase core to 16.0.0. (Failed to resolve: firebase-analytics-impl), but I cannot fix the 2nd one.
Android Studio有什么问题? 昨天效果很好.
What's wrong with Android Studio? Yesterday it worked well.
请不要建议从gms添加标志库.我已经尝试过了.
Please don't suggest to add flags library from gms. I tried that already.
推荐答案
通过更改PROJECT build.grade中存储库的顺序来解决:
Fixed by changing order of repos in PROJECT build.grade:
代替
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
放入
allprojects {
repositories {
maven { url "https://maven.google.com" }
jcenter()
}
}
我认为有人提出了这个建议,但是我再也看不到他的答案了.
I think someone suggested this but I don't see his answer anymore.
非常奇怪的问题.
这篇关于无法解决:play-services-flags的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!