Reputation: 71
Im trying to put an admob on one of my activities and i did everything instructed and I keep getting this error when i run the code "You must have AdActivity declared in AndroidManifest.xml with configChanges, when i use all the code i get a build error..(I have all the permissions needed declared as well)
Here is my android manifest code for the ad:
<activity
android:name = "com.google.ads.AdActivity"
android:configChanges= "keyboard|keyboardHidden|orientation|screenLayout|uiMode">
</activity>
Here is my xml code for the activity i want it displayed on:
<com.google.ads.AdView
android:layout_gravity=""
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="MY_PRIVATE_ID"
ads:loadAdOnCreate="true"
ads:adSize = "BANNER" />
Can someone give me a clear and simple answer as to what I need to do in order to get this running, I also downloaded android 3.2, but I dont know how to configure in the build path of my existng android 2.3 project
Upvotes: 0
Views: 583
Reputation: 2281
I would take a look at a previous answer. There's an awesome explanation given there.
Upvotes: 0
Reputation: 6774
I think it depends on which version of the jar file you are using.
For GoogleAdMobAdsSdk-4.1.1.jar try
android:configChanges= "keyboard|keyboardHidden|orientation"
and for GoogleAdMobAdsSdk-4.1.3.jar try
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
Upvotes: 1