Import existing c++ library (.a or .so file) ndk android
<p>I just gone through native development in android. I am successful in getting my <strong>AndroidStudio 2.2.2</strong> ready for native debelopment</p>

<p>I also build sample <strong>hello-jni</strong> project</p>

<p><strong>What I am trying to achieve</strong></p>

<p>I am trying to use an existing library designed in c++ (I will be provided with static library <strong>.a</strong> extension or <strong>.so</strong> file)</p>

<p><strong>Few confusions regarding native developement</strong></p>

<p>1) Shall I use the .cpp &amp; .h files of the existing c++ library instead of <strong>.a</strong> or <strong>.so</strong> file ?</p>

<p>2) Do I need to make <strong>CMakeLists.text</strong> : So far as I googled my <strong>.a files</strong> is not generated using <strong>ndk-build</strong> , so I need to make it.</p>

<p>If I use <strong>.cpp &amp; .h files</strong> , should I make <strong>Android.mk</strong> &amp; <strong>Application.mk</strong></p>

<p>Does <strong>CMakeLists.text</strong> compile my newly developed android project as library or my existing <strong>.a</strong> file ?</p>

<p>3) Where do I put the <strong>.a</strong> file in my project . Is it under <strong>jni folder?</strong></p>

<p>4) Should my java class files should define methods with <strong>keyword native</strong> same like as implemented in c++ file (Example  : In c++ file method name getData() , should java class contain public native getData() )</p>