Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Google AdMob integration issues

orassrorassr USMember ✭✭

I was following Jame's tutorial on YouTube here, when I build my app the Splashscreen is go on but than the app is crashing with this error message:

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.companyname.theone.core-K_yTq6gblFt2NGGn-iZmeg==/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname.theone.core-K_yTq6gblFt2NGGn-iZmeg==/lib/arm64, /data/app/com.companyname.theone.core-K_yTq6gblFt2NGGn-iZmeg==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]'

On google/stackoverflow keep saying to use the right app id which I did.

Also, I tried to switch between the NuGet packages - the regular and the light version.
Thank you!

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    Please mark sure the AdMob App ID has been added in the AndroidManifest.xml. The value is available in the App settings page of the Google Admob site.

    <application>
          <!-- TODO: Replace with your real AdMob app ID -->
          <meta-data
              android:name="com.google.android.gms.ads.APPLICATION_ID"
              android:value="ca-app-pub-################~##########"/>
      </application>
    

    Tutorial:
    https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml

    You could search with the keyword as Unable to get provider com google android gms ads MobileAdsInitProvider to check the related guideline video.

Sign In or Register to comment.