android error : Gradle sync failed: Gradle DSL method not found: 'classpath()'
<p>hi i'm newbie with Android studio, after updating from android studio 1.4 to 2.1, I am getting the following build error when I try and sync my project:</p>

<pre><code>Gradle sync failed: Gradle DSL method not found: 'classpath()'
</code></pre>

<p>and Here is the build.gradle:</p>

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

android {
    compileSdkVersion  23
    buildToolsVersion  "23.0.3"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId  "android.arisa.---------"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        //multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    compile('com.afollestad.material-dialogs:core:0.8.1.0@aar') {
        transitive = true
    }
    compile('com.afollestad.material-dialogs:commons:0.8.1.0@aar') {
        transitive = true
    }
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.google.android.gms:play-services-maps:7.8.0'
    compile 'com.google.android.gms:play-services-location:7.8.0'
    //compile 'com.android.support:multidex'
    //compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    //compile 'com.mcxiaoke.volley:library:1.+'
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/.idea/libraries/jsoup-1.8.3.jar')
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/jsoup-1.8.3.jar')
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/libraries/jsoup-1.8.3.jar')
    compile 'com.google.android.gms:play-services:8.3.0'
}
repositories {
    jcenter()
}
//repositories {
//    maven { url "https://jitpack.io" }
//}
</code></pre>

<p>and the gradle-wrapper.properties is:</p>

<pre><code>#Sat Apr 30 11:59:41 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
</code></pre>

<p>How can i correct this?(please help me)</p>

<hr>

<p>edit: After editing grade, my android gradle is:</p>

<pre><code>apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "android.arisa.kalahroodfinal"
        minSdkVersion 10
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }
}
allprojects {
    repositories {
        jcenter()
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    compile('com.afollestad.material-dialogs:core:0.8.1.0@aar') {
        transitive = true
    }
    compile('com.afollestad.material-dialogs:commons:0.8.1.0@aar') {
        transitive = true
    }
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.google.android.gms:play-services-maps:7.8.0'
    compile 'com.google.android.gms:play-services-location:7.8.0'
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/.idea/libraries/jsoup-1.8.3.jar')
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/jsoup-1.8.3.jar')
    compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/libraries/jsoup-1.8.3.jar')
    compile 'com.google.android.gms:play-services:8.3.0'
}
</code></pre>

<p>but i have new error: </p>

<pre><code>Error:(43, 13) Failed to resolve: com.afollestad.material-dialogs:commons:0.8.1.0
Error:(40, 13) Failed to resolve: com.afollestad.material-dialogs:core:0.8.1.0
</code></pre>