title: ndk finished with non-zero exit value 69
body: <p>i am learning ndk in android.I got a problem.
  here is error info:
  Error:Execution failed for task ':app:compileDebugNdk'.</p>
  
  <pre><code>&gt; com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/yishuaiqin/Documents/adt-bundle-mac-x86_64-20140702/sdk/ndk-bundle/ndk-build'' **finished with non-zero exit value 69**
  </code></pre>
  
  <p>build.gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.3"
  
      defaultConfig {
          applicationId "com.example.yishuaiqin.myapplication"
          minSdkVersion 15
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
  
          ndk{
              moduleName "JniDemo"
          }
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.4.0'
  }
  </code></pre>
  
  <p>I tried to add     </p>
  
  <pre><code>sourceSets.main {
          res.srcDirs = ['src/main/res']
          jniLibs.srcDirs = ['src/main/JniDemo']
          jni.srcDirs = [] // This prevents the auto generation of Android.mk
      }
  </code></pre>
  
  <p>but i will happen another error,this:</p>
  
  <pre><code>FATAL EXCEPTION: main
                                                                                        Process: com.example.yishuaiqin.myapplication, PID: 19774
                                                                                        java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-support-annotations-23.4.0_a08614bb6283cfa324b87685191afbfb59aca883-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-internal_impl-23.4.0_d3bbf4c848f2f380fb4656d172d460d67e20c13a-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-com.android.support-support-vector-drawable-23.4.0_349aae7a307baa89345a2ee68f546bcfc06d7dcb-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-com.android.support-support-v4-23.4.0_1345311585f1d2a3e686ce5b1400b7695dd6eb16-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-com.android.support-appcompat-v7-23.4.0_f833b9499bab0649a8dfe39f8821365db78812c6-classes.dex", dex file "/data/data/com.example.yishuaiqin.myapplication/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-23.4.0_1ce53af57ba1082cd25ff52df7ce61dddbd9cdad-classes.dex"],nativeLibraryDirectories=[/data/app/com.example.yishuaiqin.myapplication-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libJniDemo.so"
                                                                                            at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                                                            at java.lang.System.loadLibrary(System.java:1076)
                                                                                            at com.example.yishuaiqin.myapplication.NdkTest.&lt;clinit&gt;(NdkTest.java:10)
                                                                                            at com.example.yishuaiqin.myapplication.MainActivity.onCreate(MainActivity.java:14)
                                                                                            at android.app.Activity.performCreate(Activity.java:6237)
                                                                                            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                                                            at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                            at android.os.Looper.loop(Looper.java:148)
                                                                                            at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  </code></pre>
  
  <p>I tried solutions in other answers,but not help me.
  Anyone has any idea? Thanks at advance.</p>