我正在将AdMob集成到我的Android应用程序中。Admob集成 - 问题
我main.xml
:
`<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="XXX"
ads:loadAdOnCreate="true"
ads:adSize="BANNER" />
</LinearLayout>`
我manifest.xml
:
<activity android:name="com.google.ads.AdActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboard|keyboardHidden"/>
我的类:
AdView adView = (AdView)findViewById(R.id.adView);
adView.loadAd(new AdRequest());
我采用了Android 2.1。当我在模拟器上运行时,它向我显示:
You Must have AdActivity declared in AndroidManifest.xml with configChanges
有人能帮助我吗?
我已更新,但它显示我有同样的问题...任何人都可以发送给我一个应用程序与admob集成在我的电子邮件? [email protected]请帮忙 – Javo
错误:错误:不允许使用字符串类型('configChanges'的值为'keyboard | keyboardHidden | orientation | screenLayout | uiMode | screenSize | smallestScreenSize') – Javo
您是否将目标设置为android-13?您使用的是Android 3.2的Android库吗? –