0
votes

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

FAILURE: Build failed with an exception.

BUILD FAILED in 1s

1

1 Answers

2
votes

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)