Skip to content Skip to sidebar Skip to footer

Unable To Build Project After Update To Android Studio Preview 3.0 Canary 3

I Just update my android studio preview 3.0 canary 3. After this I am trying to run the project but showing following error. Error:Could not find com.android.tools.build:gradle:3.0

Solution 1:

The main things you need to do are:

Change your project level build.gradle file to:

buildscript {
    repositories {
        ...
        // You need to add the following repository to download the// new plugin.
        maven {
          url 'https://maven.google.com'
        }
    }

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

Change the distributionUrl of your gradle-wrapper.properties to the currently latest available release of Gradle.

distributionUrl=https://services.gradle.org/distributions/gradle-4.0-rc-1-all.zip

After this steps your project could not compile yet, and you need to follow all the instructions here on how to convert your app build.gradle to the new plugin

Solution 2:

Change your build.gradle (project_name) 's one line(classpath) as per update:-

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alpha3'// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files
}

Post a Comment for "Unable To Build Project After Update To Android Studio Preview 3.0 Canary 3"