Hello readers, this is Simple guide will help you in fixing an error given by admob 4.3.1 "Error Message Regarding AdActivity and configChanges"
When you update your Admob to version 4.3.1 you may saw this instead of ads – “You must have AdActivity declared in AndroidManifest.xml with configChanges.”
If you’ve just updated Admob and begun using GoogleAdMobAdsSdk-4.3.1.jar, then you might have seen this as well. But this can be fixed easily. Follow on
So your mind start think "what does that Bug mean?" This means have declared "the AdActivity in my manifest". (If Yes then proceed to Step 2 other wise follow Step 1*)
Step1
(Declaring the Adactivity in mainfest)
To Declare, You actually Need to changed the required lines. You now need to include some new flags, making your new declaration:
<activity android:name=”com.google.ads.AdActivity” android:configChanges=”keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize”/>
Ok, The above code looks well fine. Pate this to your mainfest and now we have some more couple of errors.
Step2
(Fixing Broken xml)
You will be getting that shows "XML is now broken".
Error:
[2012-01-13 10:14:38 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for Your location\AndroidManifest.xml: Open quote is expected for attribute "android:name" associated with an element type "activity".[2012-01-13 10:14:38 - Act_Home] Error in an XML file: aborting build.
Why This error ?
Simply, the new required flags are actually only available in Android 3.2 and above. Specifically, uiMode is available in API 8, and the last two flags are only in API 13.
You may think that – my app targets to Android 2.x predominantly and it’s rather foolish that Admob expects you to be using 3.2 and above.
No need To worry
However, your app is still perfectly usable in the same versions of Android as it was before.
Just go into the project properties and change the build target to 13 or above, and everything should now work.
How to change the build target
Go to your pakage properties
If u dont have API 13 Then simply follow this :-
Go to SDK manager and download API 13
Step 3
(Admob ads Start displaying)
Test your app, and your ads should now show up.
Congratulations, you just made it all the way back to where you started before you updated Admob.
Thanks for reading this guide, Kindly Subscribe,Follow,like our site, twitter,facebook for more future updates
Guide written by Deep singhal




No comments:
Post a Comment