Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
497 views
in Technique[技术] by (71.8m points)

admob - Missing adActivity with android:configChanges in AndroidManifest.xml

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"/>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...