Google Play Services: The meta-data tag in your app's AndroidManifest.xml does not have the right..

Here is the error:

Java.Lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5089000 but found 5. You must have the following declaration within the element:
at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00063] in /Users/builder/data/lanes/1131/2a7b6821/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:508
at at Android.Gms.Ads.AdView.LoadAd (Android.Gms.Ads.AdRequest)
at Location.Droid.MainActivity.OnCreate (Android.OS.Bundle) [0x00217] in c:\BackgroundLocaitn example Xamarin\location.Android\MainActivity.cs:1131
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/1131/2a7b6821/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Android.App.Activity.cs:1944
at at (wrapper dynamic-method) object.0e585706-b28f-4821-b7b4-b20caecd383d (intptr,intptr,intptr)
at --- End of managed exception stack trace ---

The thing is, everything I find tells me to add what I've already added, here is in my android manifest:

            android:value="@integer/google_play_services_version" />

Here is the code. The flag occurs on the line: ad.LoadAd(requestbuilder.Build());

        var ad = new AdView(this);
        ad.AdSize = Android.Gms.Ads.AdSize.SmartBanner;
        ad.AdUnitId = "(the ad id)";
        var requestbuilder = new Android.Gms.Ads.AdRequest.Builder();
        var layoutZ = FindViewById<LinearLayout>(Resource.Id.mainlayout);

I am absolutely desperate, I have spent so much time on such a small issue. Any help would be greatly appreciated.


  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    What happens if you remove that meta-tag? I don't have such a meta-tag in any of my apps that uses Google Play Services to show some maps. I am just guessing because I have not used ads.

  • SamKirwenSamKirwen USMember

    Gives me the same error

  • DualDubDualDub GBMember ✭✭

    Hi Sam, have you sorted the problem?

Sign In or Register to comment.