title: Android 4.2 ndk: library loading crash: load_library(linker.cpp:750) || soinfo_link_image || libhoudini.so || opencv
body: <p>I am using a native library that includes opencv.
  The library builds well and works well in all devices and emulators, but not on Android 4.2 ones. It crashes on <code>System.loadLibrary("mylib");</code>.</p>
  
  <p>The library is built for armeabi-v7a armeabi x86 mips (I see in the jnilibs folder that all the so files were generated)</p>
  
  <p>I am stuck on this bug because I couldn't find any answer on the internet which could explain my problem.</p>
  
  <p><code>Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libopencv_java.so"</code>, log trace:</p>
  
  <pre><code>1755-1755/com.ex.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
     java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libopencv_java.so" needed by "libmylib.so"; caused by load_library(linker.cpp:745): library "libopencv_java.so" not found
             at java.lang.Runtime.loadLibrary(Runtime.java:371)
             at java.lang.System.loadLibrary(System.java:535)
             at com.ex.app.core.MyApplication.initVippAsync(MyApplication.java:198)
             at com.ex.app.core.MyApplication.onCreate(MyApplication.java:100)
             at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1000)
             at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4391)
             at android.app.ActivityThread.access$1300(ActivityThread.java:141)
             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
             at android.os.Handler.dispatchMessage(Handler.java:99)
             at android.os.Looper.loop(Looper.java:137)
             at android.app.ActivityThread.main(ActivityThread.java:5039)
             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:793)
             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
             at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Android.mk:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  OPENCV_INSTALL_MODULES:=on
  include /Users/ahmed/Documents/openCv4android/OpenCV-2.4.10-android-sdk/sdk/native/jni/OpenCV.mk
  LOCAL_MODULE    := mylib
  LOCAL_LDLIBS += -llog -ldl
  LOCAL_SRC_FILES := myFile.c
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>Application.mk:</p>
  
  <pre><code>APP_ABI := armeabi-v7a armeabi x86 mips
  APP_PLATFORM := android-16
  </code></pre>