title: JNI folder in Android Studio
body: <p>I am trying make helloy-jni app in Android Studio and I have exception</p>
  
  <pre><code>06-27 13:17:19.099  12714-12714/com.example.testjni2           E/AndroidRuntime: FATAL EXCEPTION: main
      java.lang.ExceptionInInitializerError
      at java.lang.Class.newInstanceImpl(Native Method)
      at java.lang.Class.newInstance(Class.java:1319)
      at android.app.Instrumentation.newActivity(Instrumentation.java:1071)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2166)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
      at android.app.ActivityThread.access$700(ActivityThread.java:154)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:137)
      at android.app.ActivityThread.main(ActivityThread.java:5306)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:511)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
      at dalvik.system.NativeStart.main(Native Method)
      Caused by: java.lang.UnsatisfiedLinkError: Couldn't load hello-jni from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.testjni2-1.apk,libraryPath=/data/app-lib/com.example.testjni2-1]: findLibrary returned null
      at java.lang.Runtime.loadLibrary(Runtime.java:365)
      at java.lang.System.loadLibrary(System.java:535)
      at com.example.testjni2.MainActivity.&lt;clinit&gt;(MainActivity.java:9)
      ... 15 more
  </code></pre>
  
  <p>My structure project looks like this</p>
  
  <p><img src="https://i.stack.imgur.com/0YUyL.png" alt="TestJni2Project"></p>
  
  <p>I added my build.gradle line:</p>
  
  <pre><code>   compile files('libs/armeabi/libhello-jni.so')
  </code></pre>
  
  <p>But this don't helped.
  I read <a href="http://www.gradle.org/docs/current/userguide/dependency_management.html" rel="noreferrer">Gradle</a> and <a href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Introduction" rel="noreferrer">Android Gradle plugin</a>, but I don't find information about working with jni folder </p>
  
  <p>I am thinking what it <a href="http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:file_dependencies" rel="noreferrer">file dependencies</a>, but it isn't working</p>
  
  <p>My hello-jni.c file includ</p>
  
  <pre><code>jstring  Java_com_example_testjni2_MainActivity_stringFromJNI (JNIEnv *env, jobject thiz){
      return (*env)-&gt;NewStringUTF(env, "Hello from JNI !");
    }
  </code></pre>
  
  <p>My MainActivity file include</p>
  
  <pre><code>public class MainActivity extends Activity {
      static {
          System.loadLibrary("hello-jni");
      }
      public native String  stringFromJNI();
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          String text = stringFromJNI();
          Log.i("MainActivity", text);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>My Android.mk file containts</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  include $(CLEAR_VARS)
  
  LOCAL_MODULE    := hello-jni
  LOCAL_SRC_FILES := hello-jni.c
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>Tell me, please, where I could make a mistake. </p>
  
  <p>Android Studio 0.1.7
  OS - Windows 7 x64</p>