Maria Khalid
Maria Khalid

Reputation: 189

Gradle synchrozination Error

I am new to Android, and working in studio2.2 beta version. My build.gradle file has following content

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {url 'http://repo1.maven.org/maven2'}
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

But on synchronization , Its giving the following error

Error:Could not find com.android.tools.gradle:2.0.0:.
Searched in the following locations:
    file:/D:/android-studio/gradle/m2repository/com/android/tools/gradle/2.0.0//2.0.0-.pom
    file:/D:/android-studio/gradle/m2repository/com/android/tools/gradle/2.0.0//2.0.0-.jar
    https://jcenter.bintray.com/com/android/tools/gradle/2.0.0//2.0.0-.pom
    https://jcenter.bintray.com/com/android/tools/gradle/2.0.0//2.0.0-.jar
Required by:
    :MyApplication:unspecified

Any help ?

Upvotes: 0

Views: 167

Answers (2)

bilal_azam
bilal_azam

Reputation: 4800

Current android gradle tool version is 2.2.0 for android studio 2.2. Also, you can now use stable release, no need for beta version

classpath 'com.android.tools.gradle:2.2.0'

Also you need gradle 2.14.1+ for this plugin.

Upvotes: 1

Aleksandar G
Aleksandar G

Reputation: 1181

try:

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

            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }

    allprojects {
        repositories {
            jcenter()
        }
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }

Upvotes: 1

Related Questions