title: How to import local c++ shared library .so into Android studio 1.5?
body: <p>I have a simple question, but very specific.</p>
  
  <p>I built in a c++ project (non-android) a shared library .so which I'm using for others projects.</p>
  
  <p>I want to use it now to develop an Android app with Android NDK. In the /app/src/main/jni folder, I have the cpp file and I would like to use the functions of my library. Here the content of the .cpp file</p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;jni.h&gt;
  #include &lt;mysharedlibrary.h&gt;
  
  jstring
  Java_com_example_nativeapp_MyActivity_stringFromJNI( JNIEnv* env,
                                                  jobject thiz ) {
  
        ObjectFromSharedLibrary obj;
        functionFromSharedLibrary(obj);
        ...
  
  }
  </code></pre>
  
  <p>But I really don't know how to do it. I spent the last 2 day looking for an answer but I found nothing</p>
  
  <p>Here my environment:</p>
  
  <ol>
  <li>OS Linux Ubuntu 14.04 LTS</li>
  <li>Android studio 1.5</li>
  <li>Gradle 2.8</li>
  <li>my .so is located in /usr/local/lib and *.h in /usr/local/include/mysharedlibraryname/</li>
  </ol>
  
  <p>I want to know if it's possible and how to do it properly from scratch.</p>
  
  <p>Thanks in advance</p>