Hi,
I’m using new cocos2dx2.1.2.
And i have in-app purchases to do. So i thought of using the soomla frame work.
During initialization of soomla it needs Cocos2dxGLSurfaceView.
In the .java file there there is no instance of Cocos2dxGLSurfaceView being generated.
So i tried by calling getInstance,
StoreControllerBridge.initialize(Cocos2dxGLSurfaceView.getInstance(),
new MuffinRushAssets(), "AAA", this);
but app is crashing.
i tried doing this also
Cocos2dxGLSurfaceView mGLView;
mGLView = new Cocos2dxGLSurfaceView(this);
mGLView.setEGLContextClientVersion(2);
mGLView.setCocos2dxRenderer(new Cocos2dxRenderer());
StoreControllerBridge.initialize(mGLView,
new MuffinRushAssets(), "AAA", this);
still it is crashing
this is the crash report
05-08 16:31:29.629: E/AndroidRuntime(814): FATAL EXCEPTION: main
05-08 16:31:29.629: E/AndroidRuntime(814): java.lang.ExceptionInInitializerError
05-08 16:31:29.629: E/AndroidRuntime(814): at com.rz2games.store.EventHandlerBridge.(EventHandlerBridge.java:18)
05-08 16:31:29.629: E/AndroidRuntime(814): at com.rz2games.store.StoreControllerBridge.initialize(StoreControllerBridge.java:32)
05-08 16:31:29.629: E/AndroidRuntime(814): at com.rz2games.TankCommander.TankCommander.onCreate(TankCommander.java:55)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.os.Handler.dispatchMessage(Handler.java:99)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.os.Looper.loop(Looper.java:130)
05-08 16:31:29.629: E/AndroidRuntime(814): at android.app.ActivityThread.main(ActivityThread.java:3687)
05-08 16:31:29.629: E/AndroidRuntime(814): at java.lang.reflect.Method.invokeNative(Native Method)
05-08 16:31:29.629: E/AndroidRuntime(814): at java.lang.reflect.Method.invoke(Method.java:507)
05-08 16:31:29.629: E/AndroidRuntime(814): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
05-08 16:31:29.629: E/AndroidRuntime(814): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
05-08 16:31:29.629: E/AndroidRuntime(814): at dalvik.system.NativeStart.main(Native Method)
05-08 16:31:29.629: E/AndroidRuntime(814): Caused by: java.lang.NoClassDefFoundError: com.soomla.store.AndroidBus
05-08 16:31:29.629: E/AndroidRuntime(814): at com.soomla.store.BusProvider.(BusProvider.java:24)
i think this happened because i couldn’t get the Cocos2dxGLSurfaceView’s object correctly.
can anyone help?