我为我的一个应用程序设置了admob,它只在我的模拟器上接收广告,从未在我的手机上接收广告。Android:admob只能在模拟器中工作
设置它的xml方式(http://code.google.com/mobile/ads/docs/android/banner_xml.html),当我运行模拟器时,一切都显示正常,但只要我尝试使用手机,它就不会收到广告。
奇怪的是,我的admob帐户有1000个请求和60%的填充率。我猜想我永远都看不到他们。
为什么你认为它不适用于我的手机?由于
XML来创建它:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res/com.EricLunty.i90xLITE"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.ads.AdView android:id="@+id/adView"
ads:adUnitId="a14dbddfe120711" ads:adSize="BANNER" android:layout_height="50dip" android:layout_width="320dip"/>
<ListView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/mainList"></ListView>
</LinearLayout>
ATTRS XML:在OnCreate期间
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="com.google.ads.AdView">
<attr name="adSize">
<enum name="BANNER" value="1" />
<enum name="IAB_MRECT" value="2" />
<enum name="IAB_BANNER" value="3" />
<enum name="IAB_LEADERBOARD" value="4" />
</attr>
<attr name="adUnitId" format="string" />
</declare-styleable>
</resources>
调用这个()
adView = (AdView) findViewById(R.id.adView);
adView.loadAd(new AdRequest());
LogCat中的错误/描述是什么? – Mudassir 2011-05-03 04:43:37