title: System.loadLibrary(...) couldn't find native library in my case
body: <p>I want to use a existing native library from <strong>another</strong> Android project, so I just copied the NDK built library (<strong>libcalculate.so</strong>) to my new Android project. In my new Android project I created a folder <code>libs/armeabi/</code> and put <strong>libcalculate.so</strong> there. There is <strong>no</strong> jni/ folder. My testing device has ARM architecture.</p>
  
  <p>In my java code I load the library by:</p>
  
  <pre><code>  static{
      System.loadLibrary("calculate");
    }
  </code></pre>
  
  <p>When I run my new android project, I got error:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError:  ...
  nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libcalculate.so"
  </code></pre>
  
  <p>So, as error says, the copied native library is not in /verdor/lib or /system/lib , how to resolve this problem in my case?</p>
  
  <p>(I unziped the apk package, under lib/ there is libcalculate.so)</p>
  
  <p><strong>====UPDATE=====</strong></p>
  
  <p>I also tried to create a jni/ folder under project root, and add an Android.mk file under jni/. The content of Android.mk is:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE    := libcalculate
  LOCAL_SRC_FILES := libcalculate.so
  include $(PREBUILT_SHARED_LIBRARY)
  </code></pre>
  
  <p>Then, under project root, I executed ndk-build . After that, the armeabi/ and armeabi-v7a/ directories are generated by ndk-build (with libcalculate.so inside the folder).</p>
  
  <p>Then I run my maven build the project successfully. In the final apk package, there are:</p>
  
  <pre><code>lib/armeabi/libcalculate.so
  lib/armeabi-v7a/libcalculate.so
  </code></pre>
  
  <p>But when I run my app, the same error throw:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError:  ...
  nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libcalculate.so"
  </code></pre>