AdMob的SDK 4.3.1 - 我不能显示横幅 [英] AdMob SDK 4.3.1 - I can't display banner
问题描述
我遵循AdMob的教程中的所有步骤,但是当我运行我的应用程序,而不是打着有你必须有AdActivity在AndroidManifest.xml中宣布与configChanges
I have follow all the steps on AdMob tutorial, but when I run my application instead the banner there is "You must have AdActivity declared in AndroidManifest.xml with configChanges"
我的AndroidManifest是:
My AndroidManifest is :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.gmg.android.fpg"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" >
<activity android:label="@string/app_name" android:name=".FPGActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
我觉得一切都是正确的,我为什么不能显示横幅广告吗?
I think all is correct, why I cant display the banner?
最好的问候
推荐答案
您丢失了Admob的的 configChanges
属性某些条目 AdActivity
- 看到谷歌的描述的此处。这也可能会导致你改变你的构建目标。阅读我详细的解答的相关quetsion Admob的执行错误。
You are missing some entries in the configChanges
attribute of the Admob AdActivity
-- see Google's description here. This may also cause you to change your build target. Read my detailed answer to the related quetsion Admob implementation Error.
这篇关于AdMob的SDK 4.3.1 - 我不能显示横幅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!