title: Call shared library (.so) methods within Android Studios C files
body: <p>I'm struggling with this for several days now. At the moment i'm just testing it with a simple C++ project (1 .h &amp; 1 .cpp file) and a minimalistic App including the ndk helloJNI sample code (which worked perfect easily):</p>
  
  <p><strong>Target</strong>
  Import existing C/C++ files (project) to Android Studio</p>
  
  <p><strong>Approach</strong>
  After trying out some of the (dozens) of different possibilities, i think/thought the following steps would be the best solution for my purpose:</p>
  
  <ol>
  <li>Create the shared library (Calculator.so) from Visual Studios 2015 "Create shared library for Android" (or something) [successful]</li>
  <li>Create jniLibs folder in src/main/ with its subfolders (x86 the relevant one in my case)</li>
  <li>Add the Android.mk file in src/main/jniLibs which has to be placed there (?)</li>
  <li>Include statement: System.loadLibrary("Calculator") without "lib" and ".so" in MainActivity</li>
  </ol>
  
  <p>The library is listed in Android Studio in its folder jniLibs as like the Android.mk. Moreover if i build the apk, the library is successfully packed (verified by unzipping) and i dont get any errors. 
  <em>BUT</em>: how can i call the methods in the library? I tried the different solutions offered in other threads, but i think i missed something in my .mk or my steps described above. </p>
  
  <p><strong>Tried</strong></p>
  
  <ul>
  <li>Different <code>#include &lt;myLib&gt;</code> statements in native-lib.cpp, like s</li>
  <li>Different Android.mk settings (but i'm new to make files so not even tutorials helped me much with my specific problem ::) )</li>
  <li>Other locations for the libCalculator.so like in the subfolder x86</li>
  <li>and many others - simply not reminding atm (wasntme)</li>
  </ul>
  
  <p>Your help is highly appreciated!</p>
  
  <p>Android.mk</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  APP_ABI := x86        
  
  # library info       
  include $(CLEAR_VARS)
  LOCAL_MODULE := Calculator
  LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/Calculator.so
  LOCAL_EXPORT_C_INCLUDES := ..../Visual Studio 2015/Projects/SO_Library/SO_Library
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>