我爲我的一個應用程序設置了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