title: How to completely disable NDK support in Android Studio
body: <p>We have a multi-platform project, with native support, that we are developing in Android Studio using libgdx.  We have builds working for Desktop, IOS, Android, Android Wear, and HTML5.</p>
  
  <p>On each of these platforms, we have a different "native" plugin that we are using: a static .a native library on IOS, a .dll on Windows, a bunch of .so files in Android, and a Javascript library on HTML5.  All of these, except for the HTML5 version, are built on separate platforms so can't possibly be built by the same Android Studio NDK build.</p>
  
  <p>The problem is that for each of the .java files that declare JNI routines, Android Studio 1.4.x wants to find the source files, but those source files can't possibly be compiled in the IOS project, and likewise for the PC project when running on a Mac.</p>
  
  <p>The standard solution on SO is to add </p>
  
  <pre><code>sourceSets {
      main {
          jni.srcDirs = [] //disable automatic ndk-build
      }
  }
  </code></pre>
  
  <p>To the android{} section, but this ONLY works for the Android, Android Wear launcher projects, and NOT Desktop, IOS, HTML5, etc.</p>
  
  <p>I just want Android Studio to give up on trying to compile NDK, because it can't possibly be done on non-Android projects.  Other than finding a downgrade somewhere, how do I do that?</p>
  
  <p>Thanks!</p>