我讀了很多,但沒有..AdMob不會模擬器上Android 2.2的日食工作
我不註冊我的應用程序,我想測試的AdMob後,我支付25 $ ....
我main_acticity
AdView adview = (AdView)findViewById(R.id.adView);
AdRequest re = new AdRequest();
re.addTestDevice(AdRequest.TEST_EMULATOR);
re.setTesting(true);
adview.loadAd(re);
我的XML文件
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/bt_txt2"
android:layout_below="@+id/bt_txt2"
ads:adSize="BANNER"
ads:adUnitId="pub-11072202---------"
ads:loadAdOnCreate="true"
ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" >
</com.google.ads.AdView>
MUY manifest資源配置文件
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
和ofcouser我添加googleadmobadssdk 6.4.1.jar到LIBS
登錄貓說....
Failed to provider info for com.googleandroid.gms.ads.adinfo
Can't get the viewWindth ater the first layout
no AdResponse foud, <message: /jsLoaded>
Invalid unknow request error: Cannot detenmine request type. is your ad unit id correct
@ R114而「this」是Google的官方數據,所以請多加努力。 – joao2fast4u 2014-10-30 15:14:11