title: AdMob causing: unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException
body: <p>Im trying to implement adMob but my app isn't launching and providing the following error:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/base.apk"],nativeLibraryDirectories=[/data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/lib/arm64, /system/lib64]]
      at android.app.ActivityThread.installProvider(ActivityThread.java:7369)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:6909)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6826)
      at android.app.ActivityThread.access$1400(ActivityThread.java:267)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1981)
      at android.os.Handler.dispatchMessage(Handler.java:107)
      at android.os.Looper.loop(Looper.java:237)
      at android.app.ActivityThread.main(ActivityThread.java:7762)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/base.apk"],nativeLibraryDirectories=[/data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/lib/arm64, /system/lib64]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
      at android.app.ActivityThread.installProvider(ActivityThread.java:7353)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:6909) 
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6826) 
      at android.app.ActivityThread.access$1400(ActivityThread.java:267) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1981) 
      at android.os.Handler.dispatchMessage(Handler.java:107) 
      at android.os.Looper.loop(Looper.java:237) 
      at android.app.ActivityThread.main(ActivityThread.java:7762) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047) 
      Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.aaron.derrystudios.wordresolver-mOF2EngPcA5nT8dd27zx5g==/base.apk': Bad encoded_value method type size 7
      at dalvik.system.DexFile.openDexFileNative(Native Method)
      at dalvik.system.DexFile.openDexFile(DexFile.java:365)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:107)
      at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:80)
      at dalvik.system.DexPathList.loadDexFile(DexPathList.java:444)
      at dalvik.system.DexPathList.makeDexElements(DexPathList.java:403)
      at dalvik.system.DexPathList.&lt;init&gt;(DexPathList.java:164)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:126)
      at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:101)
      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:892)
      at android.app.LoadedApk.getClassLoader(LoadedApk.java:991)
      at android.app.LoadedApk.getResources(LoadedApk.java:1248)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2614)
      at android.app.ContextImpl.createAppContext(ContextImpl.java:2606)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6724)
              ... 8 more
  </code></pre>
  
  <p>I searched for this problem and all of the solutions, like <a href="https://stackoverflow.com/questions/52786963/unable-to-get-provider-com-google-android-gms-ads-mobileadsinitprovider-java-la">this</a>, are saying you now need to provide the App ID supplied from adMob in the manifest. I have tripled checked this and the correct app ID is provided in the manifest under <code>meta-data</code> tags as you can see here:</p>
  
  <p><a href="https://i.stack.imgur.com/FPRe7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FPRe7.png" alt="appdid"></a></p>
  
  <p>I've been following this official <a href="https://developers.google.com/admob/android/quick-start" rel="nofollow noreferrer">guide</a> and went over it twice, but I am still getting this error.</p>
  
  <p>I am also using a dedicated test ad unit ID for Android banners, so I don't think that is the problem.</p>
  
  <p>What else could be causing this? </p>