Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing adActivity with android:configChanges in AndroidManifest.xml

Tags:

android

admob

I am trying to an admob banner to my application but unfortunately after doing all the steps of the Google documentation I still receive this warning in the logcat "could not find com.google.android.gms.ads.adactivity" and this message in the banner of the admob "Missing adActivity with Android: configChanges in AndroidManifest.xml" ALTHOUGH I added the Android: configChanges in AndroidManifest.xml

here is my manifest.xml

<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

I really need your help

like image 720
Randa Omar Fahmy Avatar asked Nov 28 '13 23:11

Randa Omar Fahmy


2 Answers

com.google.ads.AdActivity is declared when using the admob sdk jar in the "libs" folder. It seems you're using admob via the google play services library so change:

activity android:name="com.google.ads.AdActivity"

To activity android:name="com.google.android.gms.ads.AdActivity"

Also make sure you add the meta-data tag:

<meta-data android:name="com.google.android.gms.version"
           android:value="@integer/google_play_services_version"/>
like image 51
Nana Ghartey Avatar answered Nov 06 '22 00:11

Nana Ghartey


Add this activity to your manifest file

 <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
like image 42
Eduardo Dennis Avatar answered Nov 05 '22 23:11

Eduardo Dennis