cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
When run tests in android monitor , java.lang.NullPointerException in some tests happened when testcases rua a while ,I don't know the reason is code or monitor,if someone knows,please tell me,thank you 。These exception as follows,I just list two:
one :
02-24 08:15:43.943: E/AndroidRuntime(1141): FATAL EXCEPTION: GLThread 101
02-24 08:15:43.943: E/AndroidRuntime(1141): Process: org.cocos2d, PID: 1141
02-24 08:15:43.943: E/AndroidRuntime(1141): java.lang.NullPointerException
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.tests.EaseActionsTest$SpeedTest.altertime(EaseActionsTest.java:662)
02-24 08:15:43.943: E/AndroidRuntime(1141): at java.lang.reflect.Method.invokeNative(Native Method)
02-24 08:15:43.943: E/AndroidRuntime(1141): at java.lang.reflect.Method.invoke(Method.java:515)
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.actions.CCTimer.update(CCTimer.java:83)
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.actions.CCScheduler.tick(CCScheduler.java:277)
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.nodes.CCDirector.drawCCScene(CCDirector.java:698)
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:668)
02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1245)
two :
02-24 08:50:14.783: E/AndroidRuntime(1292): FATAL EXCEPTION: GLThread 101
02-24 08:50:14.783: E/AndroidRuntime(1292): Process: org.cocos2d, PID: 1292
02-24 08:50:14.783: E/AndroidRuntime(1292): java.lang.NullPointerException
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest$TMXOrthoVertexZ.(TileMapTest.java:1085)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.Class.newInstanceImpl(Native Method)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.Class.newInstance(Class.java:1208)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest.restartAction(TileMapTest.java:165)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest.nextAction(TileMapTest.java:151)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest$TileDemo.nextCallback(TileMapTest.java:258)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.reflect.Method.invokeNative(Native Method)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.reflect.Method.invoke(Method.java:515)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.menus.CCMenuItem.activate(CCMenuItem.java:73)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.menus.CCMenu.ccTouchesEnded(CCMenu.java:140)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.events.CCTouchHandler.ccTouchesEnded(CCTouchHandler.java:74)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.events.CCTouchDispatcher.update(CCTouchDispatcher.java:327)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:665)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1245)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1056)
When run tests in android monitor , java.lang.NullPointerException in some tests happened when testcases rua a while ,I don't know the reason is code or monitor,if someone knows,please tell me,thank you 。These exception as follows,I just list two: one : 02-24 08:15:43.943: E/AndroidRuntime(1141): FATAL EXCEPTION: GLThread 101 02-24 08:15:43.943: E/AndroidRuntime(1141): Process: org.cocos2d, PID: 1141 02-24 08:15:43.943: E/AndroidRuntime(1141): java.lang.NullPointerException 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.tests.EaseActionsTest$SpeedTest.altertime(EaseActionsTest.java:662) 02-24 08:15:43.943: E/AndroidRuntime(1141): at java.lang.reflect.Method.invokeNative(Native Method) 02-24 08:15:43.943: E/AndroidRuntime(1141): at java.lang.reflect.Method.invoke(Method.java:515) 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.actions.CCTimer.update(CCTimer.java:83) 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.actions.CCScheduler.tick(CCScheduler.java:277) 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.nodes.CCDirector.drawCCScene(CCDirector.java:698) 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:668) 02-24 08:15:43.943: E/AndroidRuntime(1141): at org.cocos2d.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1245)
two :
02-24 08:50:14.783: E/AndroidRuntime(1292): FATAL EXCEPTION: GLThread 101 02-24 08:50:14.783: E/AndroidRuntime(1292): Process: org.cocos2d, PID: 1292 02-24 08:50:14.783: E/AndroidRuntime(1292): java.lang.NullPointerException 02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest$TMXOrthoVertexZ.(TileMapTest.java:1085)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.Class.newInstanceImpl(Native Method)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.Class.newInstance(Class.java:1208)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest.restartAction(TileMapTest.java:165)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest.nextAction(TileMapTest.java:151)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.tests.TileMapTest$TileDemo.nextCallback(TileMapTest.java:258)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.reflect.Method.invokeNative(Native Method)
02-24 08:50:14.783: E/AndroidRuntime(1292): at java.lang.reflect.Method.invoke(Method.java:515)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.menus.CCMenuItem.activate(CCMenuItem.java:73)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.menus.CCMenu.ccTouchesEnded(CCMenu.java:140)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.events.CCTouchHandler.ccTouchesEnded(CCTouchHandler.java:74)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.events.CCTouchDispatcher.update(CCTouchDispatcher.java:327)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:665)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1245)
02-24 08:50:14.783: E/AndroidRuntime(1292): at org.cocos2d.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1056)