title: Android Studio, gradle, ndk, aar and the inclusion of several native shared libraries
body: <p>I pretty much read through almost every question in stackoverflow about the subject.
  I browsed documentation and work-notes of other people who are using AS + NDK + gradle to build an aar that would be included by other app.</p>
  
  <p>I was able to build the .so in a different multi-project setup where the structure was different from the one shown in one aspect: it didn't have the first jni/ layer.<br>
  I added that extra jni layer so that I'd have a sharedObjectLib#2/ hierarchy. In that jni/ dir, all i have is a single Android.mk whose sole purpose is to include $(call all-subdir-makefiles). After I did that, gradle build reports the NDK failure:
  "Error:(89) Android NDK: WARNING: There are no modules to build in this project!"</p>
  
  <p>What I can't seem to be able to do is build multiple shared objects '.so' as part of the aar.</p>
  
  <p>I would really like to know if (a) it is doable; and (b) some pointers to links and/or examples of gradle.build files that actually do that.</p>
  
  <p>Here is the structure I currently have - skipping the usual directories created by Android Studio (v. 1.2.2, btw).</p>
  
  <pre><code>--rootProject/
  --build.gradle
  --gradle.properties
  --local.properties
  --settings.gradle
  --rootProject.iml
  --app/
  --moduleProjectThatBuildsAAR/
  --build.gradle
  --build/
  --libs
  --src/
      --main/
          --res/
          --AndroidManifest.xml
          --jni/
              --Android.mk (does include $(call all-subdir-makefiles)) 
              --Application.mk
              --sharedObjectLib#1/
                  --build.gradle
                  --src/
                      -- androidTest/
                      -- main/
                          --java/
                          --jni/
                              -- Android.mk
                              -- Application.mk
                              -- *.c and *.h files
                          --libs/
                          --obj/
                      -- build.gradle
  </code></pre>
  
  <p>It's pretty convoluted and I am hoping the experts would help with simplification.</p>
  
  <p>thanks!</p>