title: Including AndroidX libraries into Unity project
body: <p>I'm getting missing class errors when I run my Unity app. I have a native code library I wrote compiled as an aar. I've just updated some code to support local notifications on Android 8 and I've used the Android X "Worker" class. My aar compiles fine but I guess I'm missing a library to include in the Unity project. Which library should I be adding? </p>
  
  <p>The error is</p>
  
  <pre><code>06-05 10:57:52.970: E/AndroidRuntime(21759): FATAL EXCEPTION: IntentService[com.help.stressfree.localnotifications.NotificationService]
  06-05 10:57:52.970: E/AndroidRuntime(21759): Process: com.help.stressfree, PID: 21759
  06-05 10:57:52.970: E/AndroidRuntime(21759): java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/work/Data$Builder;
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at com.help.stressfree.localnotifications.NotificationService.ScheduleNotification(NotificationService.java:99)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at com.help.stressfree.localnotifications.NotificationService.onHandleIntent(NotificationService.java:82)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at android.os.Handler.dispatchMessage(Handler.java:105)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at android.os.Looper.loop(Looper.java:164)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at android.os.HandlerThread.run(HandlerThread.java:65)
  06-05 10:57:52.970: E/AndroidRuntime(21759): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.work.Data$Builder" on path: DexPathList[[zip file "/data/app/com.help.stressfree-FN_ED1fyI9LY4tcsB1RWqQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.help.stressfree-FN_ED1fyI9LY4tcsB1RWqQ==/lib/arm, /data/app/com.help.stressfree-FN_ED1fyI9LY4tcsB1RWqQ==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
  06-05 10:57:52.970: E/AndroidRuntime(21759):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  </code></pre>
  
  <p>This is my gradle file for the aar library if it's relevant:</p>
  
  <pre><code>//indicates that this is a library
  apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      sourceSets {
          main {
              //Path to your source code
              java {
                  srcDir 'src/main/java'
              }
          }
      }
  
      defaultConfig {
          minSdkVersion 14
          targetSdkVersion 27
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      lintOptions {
          abortOnError false
      }
  }
  
  dependencies {
      compileOnly fileTree(include: ['*.jar'], dir: 'libs')
      androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support:support-v4:27.1.1'
      implementation 'com.android.support:support-media-compat:27.1.1'
      testImplementation 'junit:junit:4.12'
      compileOnly files('libs/classes.jar', 'libs/libmessaging_unity_player_activity.jar')
  
      def work_version = "1.0.0-alpha02"
  
      implementation "android.arch.work:work-runtime:$work_version" // use -ktx for Kotlin
  }
  
  //task to delete the old jar
  task deleteOldJar(type: Delete) {
      delete 'default/AndroidPlugin.jar'
  }
  
  //task to export contents as jar
  task exportJar(type: Copy) {
      from('build/intermediates/bundles/default/')
      into('libs/jar')
      include('classes.jar')
      ///Rename the jar
      rename('classes.jar', 'AndroidPlugin.jar')
  
  }
  
  exportJar.dependsOn(deleteOldJar, build)
  
  //task to delete the old jar
  task deleteOldAAR(type: Delete) {
  
  }
  
  //task to export contents as jar
  task exportAAR(type: Copy) {
      from('build/outputs/aar/')
      into('libs/aars')
      include('app-debug.aar')
      ///Rename the jar
      rename('app-debug.aar', 'AndroidPlugin.aar')
  
  }
  
  exportAAR.dependsOn(deleteOldAAR, build)
  </code></pre>