title: Why "x86" library is installed on a "armeabi-v7a" emulator instead of "armeabi-v7a" library?
body: <p>To introduce my problem, I have an application using NDK compiled only for "armeabi-v7a" and "x86" ABIs. So compilation gives me:</p>
  
  <pre><code>Android NDK: WARNING: APP_PLATFORM android-17 is larger than android:minSdkVersion 10 in /home/**********/AndroidManifest.xml
  [armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.9] libs/armeabi-v7a/gdbserver
  [armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
  [x86] Gdbserver      : [x86-4.9] libs/x86/gdbserver
  [x86] Gdbsetup       : libs/x86/gdb.setup
  [armeabi-v7a] Install        : libNativeFFMPEG.so =&gt; libs/armeabi-v7a/libNativeFFMPEG.so
  [armeabi-v7a] Install        : libavcodec-56.so =&gt; libs/armeabi-v7a/libavcodec-56.so
  [armeabi-v7a] Install        : libavutil-54.so =&gt; libs/armeabi-v7a/libavutil-54.so
  [armeabi-v7a] Install        : libswscale-3.so =&gt; libs/armeabi-v7a/libswscale-3.so
  [x86] Install        : libNativeFFMPEG.so =&gt; libs/x86/libNativeFFMPEG.so
  [x86] Install        : libavcodec-57.so =&gt; libs/x86/libavcodec-57.so
  [x86] Install        : libavutil-55.so =&gt; libs/x86/libavutil-55.so
  [x86] Install        : libswscale-4.so =&gt; libs/x86/libswscale-4.so
  </code></pre>
  
  <p>My problem is maybe indicated by this warning? (This is not the same ffmpeg library version on the two target ABIs but I don't think it is the problem)</p>
  
  <p>Then, I create an emulator with <em>CPU/ABI = (ARM) armeabi-v7a</em> and my lib is not loaded when the application started (but with an "x86" based device, "x86" lib is loaded and works). When I explore it (the emulator) with a shell, I can see that:</p>
  
  <pre><code>lrwxrwxrwx install 2016-07-20 10:06 lib -&gt; /data/app/com.**********/lib/x86
  </code></pre>
  
  <p>Only "x86" lib is installed... Explanations please?</p>
  
  <p>(I have the same problem testing on a Samsung Galaxy S3, the CPU should be a <em>ARM Cortex-A9</em> and this CPU implements ARMv7-A architecture. But my library is not find either...)</p>
  
  <p>&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp; AFTER SOME MANIP I FIX ERROR IN ANDROID.MK &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p>
  
  <p>If you're interested by exception generated when I call <strong>System.loadLibrary()</strong>, this is following:</p>
  
  <pre><code>07-20 12:31:23.360: D/dalvikvm(3671): Trying to load lib /data/app-lib/com.**********/libNativeFFMPEG.so 0x40cdc118
  07-20 12:31:23.370: W/System.err(3671): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libswscale-3.so" needed by "libNativeFFMPEG.so"; caused by load_library(linker.cpp:745): library "libswscale-3.so" not found
  07-20 12:31:23.370: W/System.err(3671):     at java.lang.Runtime.loadLibrary(Runtime.java:371)
  ...
  </code></pre>
  
  <p>But when I look into /data/app-lib/com.**********, I find my "armeabi-v7a" libs!!</p>
  
  <pre><code>root@android:/data/app-lib/com.********** # ls
  gdbserver
  libNativeFFMPEG.so
  libavcodec-56.so
  libavutil-54.so
  libswscale-3.so
  </code></pre>
  
  <p>But it still the exception!
  When I try to load swscale like <strong>System.loadLibrary("swscale-3");</strong> I've got following exception:</p>
  
  <pre><code>07-20 12:56:36.351: E/dalvikvm(4174): dlopen("/data/app-lib/com.**********/libswscale-3.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libavutil-54.so" needed by "libswscale-3.so"; caused by load_library(linker.cpp:745): library "libavutil-54.so" not found
  07-20 12:56:36.361: W/System.err(4174): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libavutil-54.so" needed by "libswscale-3.so"; caused by load_library(linker.cpp:745): library "libavutil-54.so" not found
  07-20 12:56:36.361: W/System.err(4174): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libavutil-54.so" needed by "libswscale-3.so"; caused by load_library(linker.cpp:745): library "libavutil-54.so" not found
  </code></pre>
  
  <p>And when I try the same to load <strong>avutil-54</strong>, I have the same exception of "NativeFFMPEG" (but with libavutil-54.so)</p>