I’m trying to get AdMob in my android-app.
When i launch the emulator it says:
“you must have adactivity declared in androidmanifest.xml with configchanges”
There are a lot of topics about this but no one fixt the issue.
Please help me out!
A proper Admob Activity in your AndroidManifest definition looks like this:
<!-- AdMobActivity definition --> <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
You are probably missing the android:configChanges part.
Note that all the configChanges parameters are required. Since not all of them exist/are allowed in older SDKS, you need to use a more recent Android version as your default build platform. You will still be able to target older Android versions if you set your minSdk properly and do not use any newer API calls in your code though.
What worked for me was to change the Android SDK version to 13 and expand the android:configChanges in the manifest to contain all parameters:
NOTE: The configChanges content is case-sensitive so make sure you preserve camelCase! (This bit me in the beginning)
I started receiving ad’s within a minute or so.
a very good tutorial, here :
Set your Build Target to latest you have (>=4) it will work.
You can still have minSdkVersion, targetSdkVersion as you like.
The ad will appear after a while, be patient 🙂