Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Problem in adding Inn-app-purchase plugin — Gideros Forum

Problem in adding Inn-app-purchase plugin

e2000e2000 Member
edited May 2016 in Plugins
Hi,
I want to use google play in app purchase plug-in in my app, i follow the installation here.

Now i'm getting this error in Android Monitor , when run the app on device and it crash :
FATAL EXCEPTION: GLThread 2456
java.lang.NullPointerException
at com.giderosmobile.android.plugins.iab.Iab.initialize(Iab.java:120)
at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:643)
at com.giderosmobile.android.GiderosRenderer.onDrawFrame(IABActivity.java:276)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Please help me where is the problem , Thanks!

Comments

  • e2000e2000 Member
    I thing the problem is with this part of tutorial :
    Add "com.giderosmobile.android.plugins.iab.Iab" as external class in your main activity
    for this, i just added
    import com.giderosmobile.android.plugins.iab.Iab;
    in my main activity , is this work right?

    Thanks.
  • simwhisimwhi Member
    Accepted Answer
    Hi @e2000

    You need to add "com.giderosmobile.android.plugins.iab.Iab" to the external classes to the main java activity. Here is an example below:
    	static
    	{
    		System.loadLibrary("gvfs");
    		System.loadLibrary("lua");
    		System.loadLibrary("gideros");
     
    		System.loadLibrary("luasocket");
    		System.loadLibrary("lfs");
    		System.loadLibrary("lsqlite3");
    		System.loadLibrary("json");
    		System.loadLibrary("bitop");
    		//Line below is a marker for plugin insertion scripts. Do not remove or change
    		//GIDEROS-STATIC-INIT//
    		System.loadLibrary("ads");
    		System.loadLibrary("facebook");
    		System.loadLibrary("iab");
    	}
     
    	static private String[] externalClasses = {
    		//Line below is a marker for plugin insertion scripts. Do not remove or change
    		//GIDEROS-EXTERNAL-CLASS//
    		"com.giderosmobile.android.plugins.ads.Ads",
    		"com.giderosmobile.android.plugins.facebook.GFacebook",
    		"com.giderosmobile.android.plugins.iab.Iab"
    	};
Sign In or Register to comment.