Issue with experimental gradle: The android plugin must be applied to the project <p>I'm trying to run some native code with the NDK in Android Studio. I have followed the steps shown <a href="http://tools.android.com/tech-docs/new-build-system/gradle-experimental" rel="nofollow">HERE</a> to use the experimental Gradle, but obviously it's not all going smoothly. I'm getting this error: <code>The android or android-library plugin must be applied to the project</code> <br/> Here is my gradle file:</p> <pre><code>apply plugin: 'com.android.model.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'io.fabric' model { android { compileSdkVersion = 22 buildToolsVersion = "22.0.1" android.ndk { moduleName = "test" } defaultConfig.with { applicationId = "com.shaperstudio.dartboard" minSdkVersion.apiLevel = 15 targetSdkVersion.apiLevel = 22 versionCode = 1 versionName = "1.0" } } android.buildTypes { release { minifyEnabled = false proguardFiles += file('proguard-rules.pro') } } packagingOptions { exclude = 'META-INF/services/javax.annotation.processing.Processor' } } repositories { maven { url "https://jitpack.io" } maven { url 'https://maven.fabric.io/public' } } buildscript { repositories { jcenter() maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' classpath 'io.fabric.tools:gradle:1.+' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.android.support:design:22.2.0' compile 'com.jakewharton:butterknife:6.1.0' compile 'de.greenrobot:eventbus:2.4.0' apt 'com.bluelinelabs:logansquare-compiler:1.1.0' compile 'com.bluelinelabs:logansquare:1.1.0' compile 'com.birbit:android-priority-jobqueue:1.3' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.facebook.android:facebook-android-sdk:4.1.0' compile 'com.parse.bolts:bolts-android:1.+' compile fileTree(dir: 'libs', include: '*.jar') compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') { transitive = true; } } </code></pre> <p>Any help as to why I'm getting this error would be appreciated</p>