根据该项目的自述文件https://github.com/sky-map-team/stardroid,我正在使用 gradle 构建一个 Android 项目,但 gradle 无法从存储库下载依赖项:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:support-annotations:23.1.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-annotations/23.1.0/support-annotations-23.1.0.pom
https://jcenter.bintray.com/com/android/support/support-annotations/23.1.0/support-annotations-23.1.0.jar
Required by:
stardroid:app:unspecified
...
jcenter 上似乎没有这样的文件(com.android.support:support-annotations:23.1.0),请参阅https://jcenter.bintray.com/com/android/。
在 mavenCentral 上也找不到此依赖项,请参阅http://search.maven.org/#search|ga|1|support-annotations
如何为 gradle 设置存储库以下载此类依赖项?
解决
在Android SDK Manager中下载Android Support Repository和Google Repository后构建成功。