1

Android gradle build failed with an exception, but gradle script did not been changed:

       * 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

I had ran command ./gradlew clean assembleRelease

Buildscripts and projects dependencies contain:

 jcenter()
 mavenCentral()
 maven { url 'https://maven.google.com' }

And few other repositories.

Earlier build was success (in previous week). I had found the problem when build failed on build one of all machines, but in build was success in other machines. In my computer build had broken after gradle cache clean.

Sometimes list of errors was changed. It is look like maven repositories problem (may be jcenter). Do someone face with the problem? How can fix it?

Pavel Santaev
  • 845
  • 7
  • 17
  • Update your project level gradle file and put jcenter() below google() or maven { url 'https://maven.google.com' } line. – Harsh Mittal May 29 '18 at 07:30

0 Answers0