title: How can I add a static library to Android NDK using the build.gradle file?
body: <p>I'm trying to learn to use the NDK in AndroidStudio, and I'd like to import the "android_native_app_glue" file used in the "native-activity" sample, so that I have a framework for basic functions like the display, touch, etc. In the sample, it loads the library with this line in the android.mk file:</p>
  
  <pre><code>LOCAL_STATIC_LIBRARIES := android_native_app_glue
  </code></pre>
  
  <p>and then imports it in "main.c" simply with:</p>
  
  <pre><code>#include &lt;android_native_app_glue.h&gt;
  </code></pre>
  
  <p>But in AndroidStudio, as far as I can tell from experimenting with it, it doesn't use the android.mk file at all and instead uses the build.gradle file to do all the same functions instead. So, for example, to replace <code>LOCAL_LDLIBS := ...</code> in the android.mk, I used <code>ldLibs = ...</code> in the build.gradle. What gradle code replaces <code>LOCAL_STATIC_LIBRARIES</code>?</p>
  
  <p>Is there also a resource somewhere that explains, in general, how to translate from android.mk to build.gradle?</p>