I'm trying to build my android project using gradle and circleCI, but I've got this error :
* What went wrong: A problem occurred configuring root project '<myproject>'. > Could not resolve all dependencies for configuration ':classpath'. > Could not find com.android.tools.build:gradle:2.2.3. Searched in the following locations: file:/home/ubuntu/.m2/repository/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom file:/home/ubuntu/.m2/repository/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar Required by: :<myproject>:unspecified
Can someone explain me why I've got this problem please?
It seems the current versions of the Android Gradle plugin are not added to Maven Central, but they are present on jcenter. Add jcenter()
to your list of repositories and Gradle should find version 2.2.3
. On Maven Central the newest available version is 2.1.3
: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.android.tools.build%22%20AND%20a%3A%22gradle%22. You can also complain to the authors that the current versions are missing on Maven Central.
Reading sembozdemir answer in this post I have resolved a similar problem adding jcenter() in build.gradle (module: cordovaLib)
buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With