Android gradle build失败并出现异常,但gradle脚本未更改:
* What went wrong:
A problem occurred configuring root project '*****'.
> Could not resolve all files for configuration ':classpath'.
> Could not find repository.jar (com.android.tools:repository:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/repository/26.0.1/repository-26.0.1.jar
> Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/26.0.1/tracker-26.0.1.jar
我跑了命令 ./gradlew clean assembleRelease
构建脚本和项目依赖项包含:
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
还有其他一些知识库。
早期的构建是成功的(前一周)。我在构建所有机器之一时构建失败时发现了问题,但在构建中却在其他机器上成功。 在我的计算机构建中,在gradle cache clean之后已经崩溃。
有时错误列表已更改。 它看起来像maven存储库问题(可能是 jcenter )。 有人面对这个问题吗?怎么解决它?