title: Firebase ML Kit class not found when used in Unity3D Android Plugin
body: <p>Firebase MLKit, specifically the vision component for face detection doesn't currently have an official unity3D plugin. I'm trying to create an android module then import into Unity3D as a plugin via the use of Unity's AndroidJavaClass interface. (build module -> copy classes.jar to unity's Plugin/Android folder). My issue is the plugin works correctly but whenever it tries to call any line associated with Firebase I'm getting the errors below. Does anybody know what's the issue? I assume it's just a simple dependency issue but I'm having trouble fixing it.</p>
  
  <p>The line that's being called. It's copied straight from the official docs and works if I keep the module as a native android app within android studio.</p>
  
  <pre><code>import com.google.firebase.ml.vision.face.FirebaseVisionFaceDetectorOptions;
  
  FirebaseVisionFaceDetectorOptions options =
          new FirebaseVisionFaceDetectorOptions.Builder()
                  .setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE)
                  .setLandmarkMode(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS)
                  .setClassificationMode(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS)
                  .build();
  </code></pre>
  
  <p>The error that's producing (only as a unity3d plugin)</p>
  
  <pre><code>12-14 16:15:17.934 29990 30008 E Unity   : AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/ml/vision/face/FirebaseVisionFaceDetectorOptions$Builder;
  12-14 16:15:17.934 29990 30008 E Unity   : java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/ml/vision/face/FirebaseVisionFaceDetectorOptions$Builder;
  12-14 16:15:17.934 29990 30008 E Unity   :      at com.danq.faceplugin.FaceD.Init(FaceD.java:14)
  12-14 16:15:17.934 29990 30008 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
  12-14 16:15:17.934 29990 30008 E Unity   :      at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
  12-14 16:15:17.934 29990 30008 E Unity   :      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
  12-14 16:15:17.934 29990 30008 E Unity   :      at android.os.Handler.dispatchMessage(Handler.java:102)
  12-14 16:15:17.934 29990 30008 E Unity   :      at android.os.Looper.loop(Looper.java:227)
  12-14 16:15:17.934 29990 30008 E Unity   :      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
  12-14 16:15:17.934 29990 30008 E Unity   : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.ml.vision.face.FirebaseVisionFaceDetectorOptions$Builder" on path: DexPathList[[zip file "/data/app/com.Danq.FaceBeatsUnityGame-4MLAWSIBswXt4mPwAhlr_Q==/base.apk"],nativeLibraryDirectories=[/data/app/com.Danq.FaceBeatsUnityGame-4MLAWSIBswXt4mPwAhlr_Q
  </code></pre>
  
  <p>The module's gradle file</p>
  
  <pre><code>apply plugin: 'com.android.library'
  
  
  android
          {
      compileSdkVersion 29
      buildToolsVersion "29.0.2"
  
  
      defaultConfig
              {
          minSdkVersion 27
          targetSdkVersion 29
          versionCode 1
          versionName "1.0"
  
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
          consumerProguardFiles 'consumer-rules.pro'
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  
              repositories {
                  google()
                  jcenter()
  
              }
  
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
  
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test.ext:junit:1.1.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
      implementation 'com.google.gms:google-services:4.2.0'
  }
  </code></pre>