title: RuntimeException: Unable to instantiate application com.company.app.Application: ClassNotFoundException
body: <p>I've read a few answers on this site with the same or similar error messages, and I've tried all the solutions already. Sadly, none of them have worked so far.</p>
  <p>My gradle files all look like they're properly set up for Multidex, the <code>Application</code> class <code>extends MultiDexApplication</code> and is referenced correctly in the manifest, I've cleaned all caches and restarted the IDE, deleting builds from the project and the device and re-building/re-installing, etc. etc.</p>
  <p>Inspecting the APK, I found the <code>Application</code> in <code>classes2.dex</code>, correctly referencing <code>.super Landroidx/multidex/MultiDexApplication;</code></p>
  <p>The stack I'm getting is like this:</p>
  <pre class="lang-none prettyprint-override"><code>E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.&lt;REDACTED&gt;, PID: 25475
      java.lang.RuntimeException: Unable to instantiate application com.&lt;REDACTED&gt;.Application: java.lang.ClassNotFoundException: Didn't find class &quot;com.&lt;REDACTED&gt;.Application&quot; on path: DexPathList[[zip file &quot;/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/base.apk&quot;],nativeLibraryDirectories=[/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
          at android.app.LoadedApk.makeApplication(LoadedApk.java:1306)
          at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7401)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7374)
          at android.app.ActivityThread.access$1500(ActivityThread.java:301)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2118)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:246)
          at android.app.ActivityThread.main(ActivityThread.java:8425)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
       Caused by: java.lang.ClassNotFoundException: Didn't find class &quot;com.&lt;REDACTED&gt;.Application&quot; on path: DexPathList[[zip file &quot;/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/base.apk&quot;],nativeLibraryDirectories=[/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
          at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
          at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
          at android.app.Instrumentation.newApplication(Instrumentation.java:1158)
          at android.app.LoadedApk.makeApplication(LoadedApk.java:1298)
          at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7401) 
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7374) 
          at android.app.ActivityThread.access$1500(ActivityThread.java:301) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2118) 
          at android.os.Handler.dispatchMessage(Handler.java:106) 
          at android.os.Looper.loop(Looper.java:246) 
          at android.app.ActivityThread.main(ActivityThread.java:8425) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) 
          Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/base.apk because: Failure to verify dex file '/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.&lt;REDACTED&gt;-V2WCXZvYqUZRGKbFMfmgFg==/base.apk': Bad index for method_handle_item method_idx: ffff &gt;= de57
          at dalvik.system.DexFile.openDexFileNative(Native Method)
          at dalvik.system.DexFile.openDexFile(DexFile.java:367)
          at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:109)
          at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:82)
          at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
          at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
          at dalvik.system.DexPathList.&lt;init&gt;(DexPathList.java:166)
          at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:129)
          at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:104)
          at dalvik.system.PathClassLoader.&lt;init&gt;(PathClassLoader.java:74)
          at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
          at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
          at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
          at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
          at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:933)
          at android.app.LoadedApk.getClassLoader(LoadedApk.java:990)
          at android.app.LoadedApk.getResources(LoadedApk.java:1234)
          at android.app.ContextImpl.createAppContext(ContextImpl.java:2788)
          at android.app.ContextImpl.createAppContext(ContextImpl.java:2780)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7263)
                  ... 8 more
  </code></pre>
  <p>Can anyone figure out what this is all about?</p>