0
votes

I configured a desktop application in android studio with libgdx which doesn't compile. I also tested it on another pc and there it ran. When I start it I get the following error code:

Error:Gradle: A problem occurred configuring root project 'game'. Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:3.0.0. Searched in the following locations: file:/C:/Users/admin/.m2/repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom file:/C:/Users/admin/.m2/repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar Required by: project :

1
Please narrow down the problem and provide the minimum steps required to reproduce the problem.tambre
Show your build.gradle file please.icarumbas

1 Answers

1
votes

Google have new maven repo, so it could be the reason.

buildscript {
    repositories {
        ...
        google()     // <-- add this 
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
}

Also add in allprojects

allprojects {
    repositories {
        jcenter()
        google()
    }
}