尝试编译和调试我正在处理的Android应用程序会导致以下错误:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_prodDebugStagingCompile'.
> Could not find com.google.android.gms:play-services-analytics:8.1.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-analytics/8.1.0/play-services-analytics-8.1.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-analytics/8.1.0/play-services-analytics-8.1.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-analytics/8.1.0/play-services-analytics-8.1.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-analytics/8.1.0/play-services-analytics-8.1.0.jar
...
这些来源是否已关闭或已过期?
答案 0 :(得分:22)
打开Android Studio SDK管理器,确保所有构建工具都是最新的。然后确保您的Google Play服务和Google Repository包是最新的。在Android Studio sdk管理器中,您可以在“SDK工具”标签下找到这些内容。如果您使用的是独立的sdk管理器,则可以向下滚动到底部的“Extras”部分并在那里更新。