Gradle Issue in Android Studio 2.1.3
I got those errors when i run the Desktop application that i've created based on the Tutorial.
where i can find that Gradle 2.1.3? Please help me. Im using Libgdx framework. Thank you in advance.
Error:Gradle: A problem occurred configuring root project 'Flapp Bird'. Could not resolve all dependencies for configuration ':classpath'. Could not find com.android.tools.build:gradle:2.1.3. Searched in the following locations: file:/C:/Users/Unknown/.m2/repository/com/android/tools/build/gradle/2.1.3/gradle-2.1.3.pom file:/C:/Users/Unknown/.m2/repository/com/android/tools/build/gradle/2.1.3/gradle-2.1.3.jar
https:://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.3/gradle-2.1.3. https:://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.3/gradle-2.1.3.jar https:://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.1.3/gradle-2.1.3.pom https:://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.1.3/gradle-2.1.3.jar
Required by: :Flapp Bird:unspecified
The Gradle version 2.1.3 exists, but is not in the Maven central, as said here.
To fix the issue, just add jcenter() after mavenCentral() in your build script.
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
No, Ivan is right. The latest version of Android Studio insists on upgrading to Android Plugin for Gradle, Revision 2.1.3 (August 2016), Gradle 2.14.1 or higher and Build Tools 23.0.2 or higher. But the moment it does that, it breaks compilation with that error:
Could not resolve all dependencies for configuration ':classpath'. Could not find com.android.tools.build:gradle:2.1.3. Searched in the following locations:
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