Reputation: 5103
I have a problem implementing AdMob in my Xamarin.Forms project.
So when I run the android app this is shown in the output:
01-22 16:53:17.351 W/Ads (3529): Missing AdActivity with android:configChanges in AndroidManifest.xml.
You must have the following declaration within the <application> element:
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
But my Manifest
got this line in it..:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
And when I open the page containing the ad this is showing:
What is wrong here ?
Upvotes: 3
Views: 313
Reputation: 3455
<activity>
tag should be inside the <application>
tag
<application>
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
</application>
Upvotes: 5