title: Including an external library in an android library package
body: <p>I'm writing an android library to be used in my Unity android project in order to make use of an android library that doesn't have a good C# equivalent. The library itself is packaged and works fine, except when I run the application, I get an error:</p>
  
  <pre><code>AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/vision/face/FaceDetector$Builder;
  </code></pre>
  
  <p>Opening up my AAR I've noticed that the Google Vision library I'm using isn't in there, and since Unity can't install android libraries it can't resolve it.</p>
  
  <p>How can I package my application with the library installed?</p>
  
  <p>Here's  my <code>build.gradle</code> dependencies:</p>
  
  
  
  <pre><code>dependencies {
      provided fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:26.1.0'
      implementation 'com.android.support.constraint:constraint-layout:1.0.2'
      testImplementation 'junit:junit:4.12'
      testCompile 'org.mockito:mockito-core:1.10.19'
      androidTestImplementation 'com.android.support.test:runner:1.0.1'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
      provided files('/Applications/Unity/PlaybackEngines/AndroidPlayer/Variations/mono/Release/Classes/classes.jar')
      compile 'com.google.android.gms:play-services-vision:8.1.0'
      }
  </code></pre>
  
  
  
  <p>Thanks!</p>