Android Admob Ads Not Showing

484 views
Skip to first unread message

theofficialc...@gmail.com

unread,
Feb 28, 2017, 8:18:36 PM2/28/17
to CodenameOne Discussions
Hi,

I use the Codename One Plugin for Eclipse Mars. When I specify the build hint android.googleAdUnitId=ca-app-pub-3940256099942544/6300978111, test ads show up perfectly on the bottom of the screen of my galaxy s7 edge. However, when I replace the build hint with my actual admob app id, the ads do not show. Instead, where the banner should be at the bottom of the screen, a black bar appears. Sometimes this bar tries to blend in with the background (albeit not very well), which is a gradient. Note that I have not specified any other build hints, only the one mentioned above.

Please give your input, Thanks.

Shai Almog

unread,
Mar 1, 2017, 12:12:31 AM3/1/17
to CodenameOne Discussions, theofficialc...@gmail.com
Hi,
if I recall correctly your account needs to be approved and activated but I'm not exactly sure.

theofficialc...@gmail.com

unread,
Mar 1, 2017, 4:39:23 PM3/1/17
to CodenameOne Discussions, theofficialc...@gmail.com
My Admob account is completely setup, there is no more activation needed.

theofficialc...@gmail.com

unread,
Mar 1, 2017, 5:05:26 PM3/1/17
to CodenameOne Discussions, theofficialc...@gmail.com
**I am using my ad unit id, not my app id

theofficialc...@gmail.com

unread,
Mar 1, 2017, 5:26:12 PM3/1/17
to CodenameOne Discussions, theofficialc...@gmail.com
Update: I did a logcat on the app and I am getting these errors:

03-01 17:20:29.431 30146-30163/? E/GMPM: getGoogleAppId failed with status: 10
03-01 17:20:29.600 30146-30146/? D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
03-01 17:20:29.701 30146-30167/? W/DynamiteModule: Failed to load module via V2: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/data/app/com.challengergroup.challenger-1/base.apk"],nativeLibraryDirectories=[/data/app/com.challengergroup.challenger-1/lib/arm64, /system/lib64, /vendor/lib64]]
03-01 17:20:29.705 30146-30167/? I/DynamiteModule: Considering local module com.google.android.gms.piccard.dynamite:0 and remote module com.google.android.gms.piccard.dynamite:12
03-01 17:20:29.705 30146-30167/? I/DynamiteModule: Selected remote version of com.google.android.gms.piccard.dynamite, version >= 12
03-01 17:20:29.732 30146-30168/? I/art: Rejecting re-init on previously-failed class java.lang.Class<adb>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/chimera/Fragment;
03-01 17:20:29.732 30146-30168/? I/art:     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:28)
03-01 17:20:29.732 30146-30168/? I/art:     at void ht.h() (:com.google.android.gms.DynamiteModulesA:619)
03-01 17:20:29.732 30146-30168/? I/art:     at ht ht.a(android.content.Context, java.lang.String, java.lang.String, boolean) (:com.google.android.gms.DynamiteModulesA:2195)
03-01 17:20:29.732 30146-30168/? I/art:     at ht hk.b(android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:131)
03-01 17:20:29.732 30146-30168/? I/art:     at void hk.a(android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:91)
03-01 17:20:29.732 30146-30168/? I/art:     at hl hl.a(java.lang.String, android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:80)
03-01 17:20:29.732 30146-30168/? I/art:     at void com.google.android.gms.ads.internal.ad.run() (:com.google.android.gms.DynamiteModulesA:6183)
03-01 17:20:29.732 30146-30168/? I/art:     at java.lang.Object com.google.android.gms.ads.internal.util.ab.call() (:com.google.android.gms.DynamiteModulesA:1055)
03-01 17:20:29.732 30146-30168/? I/art:     at void com.google.android.gms.ads.internal.util.ac.run() (:com.google.android.gms.DynamiteModulesA:75)
03-01 17:20:29.732 30146-30168/? I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.chimera.Fragment" on path: DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000011/DynamiteModulesA_GmsCore_prodmnc_alldpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/00000011/n/arm64-v8a, /system/lib64, /vendor/lib64]]
03-01 17:20:29.732 30146-30168/? I/art:     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:34)
03-01 17:20:29.732 30146-30168/? I/art:     at java.lang.Class bzi.loadClass(java.lang.String, boolean) (:com.google.android.gms:28)
03-01 17:20:29.732 30146-30168/? I/art:     at void ht.h() (:com.google.android.gms.DynamiteModulesA:619)
03-01 17:20:29.732 30146-30168/? I/art:     at ht ht.a(android.content.Context, java.lang.String, java.lang.String, boolean) (:com.google.android.gms.DynamiteModulesA:2195)
03-01 17:20:29.732 30146-30168/? I/art:     at ht hk.b(android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:131)
03-01 17:20:29.732 30146-30168/? I/art:     at void hk.a(android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:91)
03-01 17:20:29.732 30146-30168/? I/art:     at hl hl.a(java.lang.String, android.content.Context, boolean) (:com.google.android.gms.DynamiteModulesA:80)
03-01 17:20:29.732 30146-30168/? I/art:     at void com.google.android.gms.ads.internal.ad.run() (:com.google.android.gms.DynamiteModulesA:6183)
03-01 17:20:29.732 30146-30168/? I/art:     at java.lang.Object com.google.android.gms.ads.internal.util.ab.call() (:com.google.android.gms.DynamiteModulesA:1055)
03-01 17:20:29.732 30146-30168/? I/art:     at void com.google.android.gms.ads.internal.util.ac.run() (:com.google.android.gms.DynamiteModulesA:75)

On Wednesday, March 1, 2017 at 12:12:31 AM UTC-5, Shai Almog wrote:

Shai Almog

unread,
Mar 2, 2017, 1:09:31 AM3/2/17
to CodenameOne Discussions, theofficialc...@gmail.com
Do you have any Android build hints other than that?

theofficialc...@gmail.com

unread,
Mar 2, 2017, 6:59:05 AM3/2/17
to CodenameOne Discussions
No, I only have the one build hint specifying my ad unit id.
I have tried adding the following build hints but they have not fixed the problem:

android.includeGPlayServices=true
android.googleAdUnitTestDevice= <my device id>

Shai Almog

unread,
Mar 3, 2017, 2:01:45 AM3/3/17
to CodenameOne Discussions, theofficialc...@gmail.com
The gplay services flag is deprecated. Try using the ads build hint from https://www.codenameone.com/manual/advanced-theming.html

theofficialc...@gmail.com

unread,
Mar 11, 2017, 6:46:02 PM3/11/17
to CodenameOne Discussions, theofficialc...@gmail.com
Thanks Shai, using the updating build hint correctly displays the ads now.
Reply all
Reply to author
Forward
0 new messages