rosu alin
rosu alin

Reputation: 5830

Cannot build after updating Android Studio

It works perfectly on my pc, but I have a buildmachine,which creates the daily builds. and I get this error on it:

error   05-Jan-2016 18:01:20    FAILURE: Build failed with an exception.
error   05-Jan-2016 18:01:20    
error   05-Jan-2016 18:01:20    * What went wrong:
error   05-Jan-2016 18:01:20    A problem occurred configuring root project 'PAS-PAD-VRANDROID'.
error   05-Jan-2016 18:01:20    > Could not resolve all dependencies for configuration ':classpath'.
error   05-Jan-2016 18:01:20       > Could not find com.android.tools.build:gradle:2.0.0-alpha3.
error   05-Jan-2016 18:01:20         Searched in the following locations:
error   05-Jan-2016 18:01:20             https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha3/gradle-2.0.0-alpha3.pom
error   05-Jan-2016 18:01:20             https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha3/gradle-2.0.0-alpha3.jar
error   05-Jan-2016 18:01:20         Required by:
error   05-Jan-2016 18:01:20             :PAS-PAD-VRANDROID:unspecified
error   05-Jan-2016 18:01:20    
error   05-Jan-2016 18:01:20    * Try:
error   05-Jan-2016 18:01:20    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
build   05-Jan-2016 18:01:20    
build   05-Jan-2016 18:01:20    BUILD FAILED

Why does this happen on 1 pc, and not on the others? I updated to the same version of Android Studio.

Upvotes: 0

Views: 965

Answers (3)

rosu alin
rosu alin

Reputation: 5830

Added jcenter() to my buildscript repositories, and now it did find 'com.android.tools.build:gradle:2.0.0-alpha3' in that repository, and I was able to build

Upvotes: 2

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363825

Could not find com.android.tools.build:gradle:2.0.0-alpha3.
error   05-Jan-2016 18:01:20         Searched in the following locations:
error   05-Jan-2016 18:01:20             https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha3/gradle-2.0.0-alpha3.pom
error   05-Jan-2016 18:01:20             https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-alpha3/gradle-2.0.0-alpha3.jar

You can check this repo using the broswer. https://repo1.maven.org/maven2/com/android/tools/build/gradle

It happens because this repo doesn't contain the 2.0.0-alpha3 version.

Just check your build.gradle file and add the jcenter repository

    repositories {
        jcenter()
    } 

Otherwise you can use the last stable plugin (instead of 2.0.0-alpha3)

com.android.tools.build:gradle:1.5.0

Upvotes: 2

Bryan Herbst
Bryan Herbst

Reputation: 67189

You are using the beta version of the Android Gradle plugin, which is managed via the SDK manager, not Android Studio.

Ensure that you have the preview tools installed via the SDK manager on your build machine, and it will work fine.

Upvotes: 1

Related Questions