Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Adverts with new PlugIn System — Gideros Forum

Adverts with new PlugIn System

antixantix Member
edited February 2017 in Plugins
So it is time again to add adverts, leaderboards, achievements, and in app purchases in my latest game. As you might have guessed, it has turned to custard almost immediately.

I am using the latest Gideros build and I couldn't seem to get even adverts working so I made a new test program...
application:setFps(60)
application:setBackgroundColor(0x000000)
stage:setOrientation(Stage.LANDSCAPE_LEFT)
 
require "ads"
 
admob = Ads.new("admob")
 
application:setBackgroundColor(0x008000)
Now when exporting to device it crashes with the following spaghetti...
02-28 08:11:54.227 10983-11008/? W/System.err: java.lang.ClassNotFoundException: com.giderosmobile.android.plugins.ads.frameworks.AdsAdmob
02-28 08:11:54.227 10983-11008/? W/System.err:     at java.lang.Class.classForName(Native Method)
02-28 08:11:54.228 10983-11008/? W/System.err:     at java.lang.Class.forName(Class.java:309)
02-28 08:11:54.228 10983-11008/? W/System.err:     at java.lang.Class.forName(Class.java:273)
02-28 08:11:54.228 10983-11008/? W/System.err:     at com.giderosmobile.android.plugins.ads.Ads.initialize(Ads.java:205)
02-28 08:11:54.228 10983-11008/? W/System.err:     at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
02-28 08:11:54.228 10983-11008/? W/System.err:     at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:669)
02-28 08:11:54.228 10983-11008/? W/System.err:     at com.giderosmobile.android.GiderosRenderer.onDrawFrame(banneradvertsActivity.java:407)
02-28 08:11:54.228 10983-11008/? W/System.err:     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
02-28 08:11:54.228 10983-11008/? W/System.err:     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
02-28 08:11:54.228 10983-11008/? W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.giderosmobile.android.plugins.ads.frameworks.AdsAdmob" on path: DexPathList[[zip file "/data/app/com.antixx.bannertest-2/base.apk"],nativeLibraryDirectories=[/data/app/com.antixx.bannertest-2/lib/arm, /vendor/lib, /system/lib]]
02-28 08:11:54.228 10983-11008/? W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-28 08:11:54.228 10983-11008/? W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-28 08:11:54.229 10983-11008/? W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-28 08:11:54.229 10983-11008/? W/System.err: 	... 9 more
02-28 08:11:54.229 10983-11008/? W/System.err: 	Suppressed: java.lang.ClassNotFoundException: com.giderosmobile.android.plugins.ads.frameworks.AdsAdmob
02-28 08:11:54.229 10983-11008/? W/System.err:     at java.lang.Class.classForName(Native Method)
02-28 08:11:54.229 10983-11008/? W/System.err:     at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-28 08:11:54.229 10983-11008/? W/System.err:     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-28 08:11:54.229 10983-11008/? W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-28 08:11:54.229 10983-11008/? W/System.err: 		... 10 more
02-28 08:11:54.229 10983-11008/? W/System.err: 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
02-28 08:11:54.259 10983-11008/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 4081
                                                   Process: com.antixx.bannertest, PID: 10983
                                                   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.Class.newInstance()' on a null object reference
                                                       at com.giderosmobile.android.plugins.ads.Ads.initialize(Ads.java:210)
                                                       at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
                                                       at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:669)
                                                       at com.giderosmobile.android.GiderosRenderer.onDrawFrame(banneradvertsActivity.java:407)
                                                       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
                                                       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
Can anyone explain what the heck is happening here?

Comments

  • hgy29hgy29 Maintainer
    Well, by the look of it Admob provider isn't installed. Didn't you tick Admob under the Ads plugin settings ? Btw, Admob is the only platform I couldn't test, I would have been more confident if you choosed unity or applovin...

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy29 yep I checked "enable admob support". Do I also need to include the google play services and gaming plugins as well?
  • Well until I can get some help with this I'll work on other things. I'm happy to report that gaming plugin manages to not crash and logs in without any issues :)

    I'll make up some leaderboards and stuff and test those this afternoon.
  • hgy29hgy29 Maintainer
    Accepted Answer
    Just for anyone reading this, this was a bug in ads.gplugin script. Fixed for next version.

    Likes: antix, totebo

    +1 -1 (+2 / -0 )Share on Facebook
  • antixantix Member
    edited March 2017
    Confirmed, it works like a charm now :bz

    (Edit: using the RC, not the official version, RC will be released soon)
Sign In or Register to comment.