Zeyad Gasser
Zeyad Gasser

Reputation: 1546

Build failed with exception

My build fail when i run the ./gradlew wrapper and i receive this message:

FAILURE: Build failed with an exception.

BUILD FAILED in 1s

Upvotes: 0

Views: 630

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006724

Your project-level build.gradle file is requesting that com.android.tools.build:gradle:3.0.1 be added to the classpath, but it does not have google() in the list of repositories.

You want that buildscript closure to look like:

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

(notice the google() line)

Upvotes: 2

Related Questions