why my BannerSample shows no ads

62 views
Skip to first unread message

midsummer banana

unread,
Jun 19, 2014, 12:58:00 AM6/19/14
to google-adm...@googlegroups.com

I use Eclipse adt boundle to compile the sample

but I got no ads but hellow word

I just changed  the AD_UNIT_ID in the sample codes.

and got Log as follow

couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
unable to resolve instance field 40
replacing opcode 0x52 at 0x0012
dead code 0x0014-0018 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
Could not find method android.app.Activity.getFragmentManager, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
unable to resolve virtual method 25: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
replacing opcode 0x6e at 0x0023
dead code 0x0026-0030 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.showErrorDialogFragment (ILandroid/app/Activity;ILandroid/content/DialogInterface$OnCancelListener;)Z
Could not find method android.content.Context.registerComponentCallbacks, referenced from method yr.<init>
unable to resolve virtual method 1584: Landroid/content/Context;.registerComponentCallbacks (Landroid/content/ComponentCallbacks;)V
replacing opcode 0x6e at 0x0056
Could not find method android.content.Context.unregisterComponentCallbacks, referenced from method yr.b
unable to resolve virtual method 1596: Landroid/content/Context;.unregisterComponentCallbacks (Landroid/content/ComponentCallbacks;)V
replacing opcode 0x6e at 0x001c
--- BEGIN 'ads-20892516.jar' (bootstrap=0) ---
--- END 'ads-20892516.jar' (success) ---
DEX prep '/data/data/com.google.example.gms.ads.banner/cache/ads-20892516.jar': unzip in 0ms, rewrite 377ms
Use AdRequest.Builder.addTestDevice("DE509CD3FE496FE0843770110D5ACC92") to get test ads on this device.
Could not find method android.webkit.WebSettings.getDefaultUserAgent, referenced from method aef.a
unable to resolve static method 3712: Landroid/webkit/WebSettings;.getDefaultUserAgent (Landroid/content/Context;)Ljava/lang/String;
replacing opcode 0x71 at 0x0011
dead code 0x0014-0016 in Laef;.a (Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
Starting ad request.
Could not find method android.webkit.WebSettings.setMediaPlaybackRequiresUserGesture, referenced from method aeq.<init>
unable to resolve virtual method 3727: Landroid/webkit/WebSettings;.setMediaPlaybackRequiresUserGesture (Z)V
replacing opcode 0x6e at 0x004b
Could not find method android.view.View.setLayerType, referenced from method aeq.k
unable to resolve virtual method 3477: Landroid/view/View;.setLayerType (ILandroid/graphics/Paint;)V
replacing opcode 0x6e at 0x000f
Could not find method android.view.View.setLayerType, referenced from method aeq.l
unable to resolve virtual method 3477: Landroid/view/View;.setLayerType (ILandroid/graphics/Paint;)V
replacing opcode 0x6e at 0x000f
couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
unable to resolve instance field 881
replacing opcode 0x52 at 0x002d
dead code 0x002f-0033 in Lbhd;.a (Landroid/content/res/Resources;)Z
Could not find method android.app.Activity.getFragmentManager, referenced from method bhd.b
unable to resolve virtual method 1198: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
replacing opcode 0x6e at 0x0027
dead code 0x002a-0034 in Lbhd;.b (ILandroid/app/Activity;I)Z
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

There was a problem getting an ad response. ErrorCode: 1
Failed to load ad: 1
Can't open keycharmap file
Error loading keycharmap file '/system/usr/keychars/cyttsp_key.kcm.bin'. hw.keyboards.65539.devname='cyttsp_key'
Using default keymap: /system/usr/keychars/qwerty.kcm.bin
GC_EXPLICIT freed 587K, 47% free 3366K/6343K, external 2058K/2129K, paused 70ms
nativeDestroy view: 0x38a3d8
D/webviewglue(3350): nativeDestroy view: 0x367f30

what should I do?

midsummer banana

unread,
Jun 20, 2014, 4:26:31 AM6/20/14
to google-adm...@googlegroups.com
AD_UNIT_ID is assigned by Admob.

Amy Quispe (AdMob SDK Team)

unread,
Jul 2, 2014, 7:46:47 PM7/2/14
to google-adm...@googlegroups.com
Hi there,

You shouldn't be dropping in the Google Play Services jar. Instead, reference it as a library project.

Amy Quispe
Reply all
Reply to author
Forward
0 new messages