-1

I read a lot but nothing..

I don't register my app, I wanna test admob after I pay 25$....

mY main_acticity

AdView adview = (AdView)findViewById(R.id.adView);
    AdRequest re = new AdRequest();
    re.addTestDevice(AdRequest.TEST_EMULATOR);
    re.setTesting(true);
    adview.loadAd(re);  

my xml file

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 manifestfile

 <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" />

and ofcouser I add googleadmobadssdk 6.4.1.jar to libs

Log cat says....

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
donfuxx
  • 11,277
  • 6
  • 44
  • 76
R114
  • 1
  • 1

2 Answers2

1

Look at this link: https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start

It says it requires at least api 9 (android 2.3)

I'm not sure why you would still need to support android 2.2 (only 0.7% according to this: https://developer.android.com/about/dashboards/index.html)

Hope this helps

Kevin van Mierlo
  • 9,554
  • 5
  • 44
  • 76
0

From your posted code xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" I can see that you are using an outdated Admob Sdk.

What you should do is to migrate your code to the google play services admob, see the official guide: https://developers.google.com/mobile-ads-sdk/docs/admob/android/play-migration

And you should also drop the support for API 8, really.

donfuxx
  • 11,277
  • 6
  • 44
  • 76
  • Clicking the accept icon ✓ next to the question is the stackoverflow way of saying "Thank you" ;-) @R114 – donfuxx Nov 08 '14 at 12:54