Unsupported version of the Android Gradle
<p>I am trying to migrate eclipse project to android studio,But I am getting following error,</p>

<p><strong>Error:The project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 2.1.2.
Fix plugin version and sync project</strong></p>

<p>This question is asked in stackoverflow,I tried to suggestion given but its not working for me.Any help greatly appreciated.</p>

<p>Below is my gradle file:</p>

<pre><code>apply plugin: 'com.android.application'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':appcompat_v7')

}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/&lt;type&gt;
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/&lt;type&gt;/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}
</code></pre>

<p>Below is my gradle-wrapper.properties file:</p>

<pre><code>#Mon Jun 20 13:18:24 IST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-1.10-all.zip
</code></pre>

<p><strong>Update:-</strong></p>

<p>After adding <code>classpath 'com.android.tools.build:gradle:2.1.0'</code> to ROOT/build.gradle I am getting following error.</p>

<pre><code>Error:(6, 0) Gradle DSL method not found: 'classpath()'
Possible causes:&lt;ul&gt;&lt;li&gt;The project 'UberTest' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
&lt;a href="fixGradleElements"&gt;Fix plugin version and sync project&lt;/a&gt;&lt;/li&gt;&lt;li&gt;The project 'UberTest' may be using a version of Gradle that does not contain the method.
&lt;a href="open.wrapper.file"&gt;Open Gradle wrapper file&lt;/a&gt;&lt;/li&gt;&lt;li&gt;The build file may be missing a Gradle plugin.
&lt;a href="apply.gradle.plugin"&gt;Apply Gradle plugin&lt;/a&gt;&lt;/li&gt;
</code></pre>