Could not find method ndk() for arguments : <p>I'm following <a href="https://codelabs.developers.google.com/codelabs/android-studio-jni/index.html?index=..%2F..%2Findex#3" rel="noreferrer">Create Hello-JNI With Android Studio</a>.</p>

<p>MAC OX 10.11.5</p>

<p>Android Studio 2.2 stable</p>

<p>java version: 1.7.0_79</p>

<p>gradle-2.14.1</p>

<p>Here's my app.gradle:</p>

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

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.chenql.helloandroidjni"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    ndk {
        moduleName "hello-android-jni"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    testCompile 'junit:junit:4.12'
}
</code></pre>

<p>Here's the error:
<a href="https://i.stack.imgur.com/kBvXi.png" rel="noreferrer">The Error Message</a></p>

<pre><code>Error:(20, 0) Could not find method ndk() for arguments [build_13jh6qtzl4f08f8c1of3mvsys$_run_closure1$_closure5@5b127949] on project ':app' of type org.gradle.api.Project.
</code></pre>

<p>Open File</p>
