title: Android: How to build AAR's dependencies into APK?
body: <p>I have an AAR that has dependencies A and B. Now I'm adding this AAR as part of dependencies of an APK.</p>
  
  <p>So in build.gradle of the APK, i have:</p>
  
  <pre><code>compile(name:'MyAAR', ext:'aar')
  </code></pre>
  
  <p>This worked fine and successfully built. But the problem is, when I actually testing the app, I got fatal exception like this:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/OkHttpClient;
          at com.squareup.picasso.OkHttpDownloader.defaultOkHttpClient(OkHttpDownloader.java:31) ...
  </code></pre>
  
  <p>This is because the APK does not have dependency on Picasso, but I used Picasso in my AAR. </p>
  
  <p>So my question is, how do I build the AAR so that when the APK build against the AAR, it will automatically take AAR's dependencies too. I tried <code>transitive = true</code>, not working.</p>