title: Unable to get provider androidx.startup.InitializationProvider
body: <p>I am trying to run the project on Android 9 device and I am getting the following Error saying <code>Unable to get provider androidx.startup.InitializationProvider:</code>.</p>
  <pre><code>2020-12-16 15:19:03.075 25234-25234/com.example.phoE/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.pho, PID: 25234
      java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: java.lang.ClassNotFoundException: Didn't find class &quot;androidx.startup.InitializationProvider&quot; on path: DexPathList[[zip file &quot;/data/appcom.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/base.apk&quot;],nativeLibraryDirectories=[/data/app/com.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/lib/arm64, /data/app/com.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
          at android.app.ActivityThread.installProvider(ActivityThread.java:6857)
          at android.app.ActivityThread.installContentProviders(ActivityThread.java:6399)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6303)
          at android.app.ActivityThread.access$1300(ActivityThread.java:241)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1819)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:216)
          at android.app.ActivityThread.main(ActivityThread.java:7188)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
       Caused by: java.lang.ClassNotFoundException: Didn't find class &quot;androidx.startup.InitializationProvider&quot; on path: DexPathList[[zip file &quot;/data/app/com.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/base.apk&quot;],nativeLibraryDirectories=[/data/app/com.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/lib/arm64, /data/app/com.example.pho-Z8JhKzo4aoi5K98ZrK71WQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
          at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
          at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:121)
          at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)
          at android.app.ActivityThread.installProvider(ActivityThread.java:6841)
          at android.app.ActivityThread.installContentProviders(ActivityThread.java:6399) 
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6303) 
          at android.app.ActivityThread.access$1300(ActivityThread.java:241) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1819) 
          at android.os.Handler.dispatchMessage(Handler.java:106) 
          at android.os.Looper.loop(Looper.java:216) 
          at android.app.ActivityThread.main(ActivityThread.java:7188) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975) 
  </code></pre>
  <p>I tried everything mentioned <a href="https://stackoverflow.com/questions/29816745/classnotfoundexception-didnt-find-class-on-path-dexpathlist">here</a> but nothing is working. Really appreciate if someone can help me.</p>
  <p>Gradle file</p>
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
      }
  }
  
  plugins {
      id &quot;com.diffplug.gradle.spotless&quot; version &quot;3.16.0&quot;
  }
  
  apply plugin: 'com.android.application'
  apply plugin: 'jacoco-android'
  apply plugin: 'realm-android'
  apply plugin: &quot;com.github.b3er.local.properties&quot;
  
  def keystorePropertiesFile = rootProject.file(&quot;sample_keystore.properties&quot;)
  
  def keystoreProperties = new Properties()
  
  def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') &amp;&amp; rootProject.file(SIGNING_KEY_FILE).exists()
  
  keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  
  android {
      compileSdkVersion 29
      buildToolsVersion &quot;29.0.2&quot;
  
      defaultConfig {
          applicationId &quot;org.fossasia.phimpme&quot;
          minSdkVersion 21
          targetSdkVersion 29
          versionCode 14
          versionName '1.11.0'
          multiDexEnabled true
          testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
          vectorDrawables.useSupportLibrary = true
          resConfigs &quot;en&quot;
          ndk {
              abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
          }
          renderscriptTargetApi 19
          renderscriptSupportModeEnabled true
      }
  
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  
      signingConfigs {
          if (TRAVIS_BUILD) {
              release {
                  storeFile KEYSTORE_FILE
                  storePassword System.getenv(&quot;STORE_PASS&quot;)
                  keyAlias System.getenv(&quot;ALIAS&quot;)
                  keyPassword System.getenv(&quot;KEY_PASS&quot;)
              }
          } else if (LOCAL_KEY_PRESENT) {
              release {
                  storeFile rootProject.file(SIGNING_KEY_FILE)
                  storePassword STORE_PASS
                  keyAlias ALIAS
                  keyPassword KEY_PASS
              }
          }
      }
  
      buildTypes {
          release {
              minifyEnabled true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  
              if (LOCAL_KEY_PRESENT || TRAVIS_BUILD)
                  signingConfig signingConfigs.release
          }
          debug {
              testCoverageEnabled false
  
          }
      }
  
      packagingOptions {
          exclude 'META-INF/maven/org.apache.maven/maven-artifact/pom.xml'
          exclude 'licenses/javolution.license.TXT'
          exclude 'META-INF/maven/org.apache.maven.wagon/wagon-http-shared/pom.properties'
          exclude 'META-INF/maven/*'
          exclude 'org/codehaus/classworlds/uberjar/boot/Bootstrapper.class'
      }
  
      configurations {
          implementation.exclude group: 'org.jetbrains', module: 'annotations'
      }
  
      lintOptions {
          abortOnError false
          disable &quot;Instantiatable&quot;
      }
  
      tasks.withType(JavaCompile) {
          configure(options) {
              // TODO
              compilerArgs &lt;&lt; &quot;-Xlint:unchecked&quot;
              compilerArgs &lt;&lt; &quot;-Xlint:-rawtypes&quot;
          }
      }
  
      dexOptions {
          jumboMode = true
      }
      externalNativeBuild {
          ndkBuild {
              path 'src/main/jni/Android.mk'
          }
      }
  }
  
  repositories {
      mavenCentral()
      maven { url &quot;https://jitpack.io&quot; }
  }
  
  spotless {
      java {
          googleJavaFormat()
          target '**/*.java'
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      androidTestImplementation('com.android.support.test.espresso:espresso-core:3.1.0', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      // Core library
      androidTestImplementation 'androidx.test:core:1.3.0'
  
      // AndroidJUnitRunner and JUnit Rules
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test:rules:1.3.0'
  
      //retrofit
      implementation &quot;com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion&quot;
      implementation &quot;com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion&quot;
      implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
  
      //google and support
      implementation &quot;androidx.appcompat:appcompat:$rootProject.supportLibraryVersion&quot;
      implementation &quot;androidx.vectordrawable:vectordrawable-animated:1.1.0&quot;
      implementation &quot;androidx.legacy:legacy-support-v4:1.0.0&quot;
      implementation &quot;com.google.android.material:material:1.2.1&quot;
      implementation &quot;androidx.vectordrawable:vectordrawable:1.1.0&quot;
      implementation &quot;androidx.palette:palette:1.0.0&quot;
      implementation &quot;androidx.cardview:cardview:1.0.0&quot;
      implementation &quot;androidx.browser:browser:1.2.0&quot;
      implementation &quot;androidx.recyclerview:recyclerview:1.1.0&quot;
      implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
  
      //exoplayer
      implementation 'com.google.android.exoplayer:exoplayer:r1.5.7'
  
      implementation &quot;androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion&quot;
  
  
      implementation 'com.koushikdutta.ion:ion:3.0.9'
      implementation 'org.jetbrains:annotations-java5:20.1.0'
      implementation 'com.android.support:multidex:1.0.3'
      implementation group: 'com.box', name: 'box-android-sdk', version: '5.0.0'
  
  
  
  }
  
  apply plugin: 'com.android.application'
  apply plugin: 'jacoco-android'
  </code></pre>