title: NDK - Swig - Android Studio - No implementation found error
body: <p>I created an Android Application that uses the NDK.
  Under the jni directory I have bunch of C++ files and a .c and .h file under C directory. I created the JNI interfaces using the swig tool over the C++ code. So far so good. 
  The application is compiling file and I was able to run the application and invoke an API from the C++ class.</p>
  
  <p>Now I want to make a static library using the .c and .h file and include that in my Android.mk instead of compiling all the files into a single .so file.
  I created a new Android.mk file and included .c and created a Static Library.
  When I compile the code i can see the .a file is created.</p>
  
  <p>I included the following lines to Android.mk file under jni directory.</p>
  
  <pre><code>include $(call all-subdir-makefiles)
  </code></pre>
  
  <p>... remove the .c file from the LOCAL_SRC_FILES variable.</p>
  
  <pre><code>LOCAL_STATIC_LIBRARIES += libhello
  </code></pre>
  
  <p>After this changes, 
  I can compile the code and launch the application. But when ever I invoke the API from the C++ class( same function which worked earlier), now the application crashes with an exception
  java.lang.UnsatisfiedLinkError: No implementation found</p>
  
  <ul>
  <li>I Verified to see if .so file is available in the apk and that does not seems to be the problem. </li>
  <li>Checked that the .so file is loading correctly.</li>
  <li>Instead of specifying "include $(call all-subdir-makefiles)"
  I also tried by directly included "#include C/Android.mk"</li>
  <li>I tried searching for simi</li>
  </ul>
  
  <p>Still the application fails with the same exception. 
  Appreciate if somebody can help me resolve this issue.</p>
  
  <p>Thanks,
  Ajala</p>
  
  <p>I'm providing the Android.mk file content for the project </p>
  
  <pre><code>/*********************************************/
  LOCAL_PATH := $(call my-dir)
  MY_PATH := $(LOCAL_PATH)
  
  include $(call all-subdir-makefiles)
  
  
  
  include $(CLEAR_VARS)
  
  LOCAL_MODULE    := SWIGCPlusTester
  
  LOCAL_CPP_EXTENSION := .cxx .cpp
  
  
  MY_LOCAL_SRC_FILES := 
  $(wildcard $(MY_PATH)/*.cpp)
  MY_LOCAL_SRC_FILES := \
  $(wildcard $(MY_PATH)/*.cxx)
  
  
  LOCAL_SRC_FILES := \
  $(subst jni/, , $(MY_LOCAL_SRC_FILES))
  
  LOCAL_LDLIBS :=-llog
  
  LOCAL_STATIC_LIBRARIES := libhello
  
  include $(BUILD_SHARED_LIBRARY)
  /*********************************************/
  </code></pre>
  
  <p>I'm also attaching the Android.mk file content that is present in the "C" directory. </p>
  
  <pre><code>/*********************************************/
  LOCAL_PATH := $(call my-dir)
  LOCAL_PATH_INCLUDE := $(LOCAL_PATH)
  
  include $(CLEAR_VARS)
  
  LOCAL_MODULE := hello
  
  LOCAL_SRC_FILES := hello.c
  
  include $(BUILD_STATIC_LIBRARY)
  /*********************************************/
  </code></pre>
  
  <p>I created the mk file based on the sample <a href="https://code.google.com/p/razzlegames-android-ndk-tutorial/" rel="nofollow">https://code.google.com/p/razzlegames-android-ndk-tutorial/</a>
  Hope this information helps to identify the issue.</p>