Any Android apk crashes with this message

Any Android apk crashes with this message
0.0 0


E/AndroidRuntime( 4161): FATAL EXCEPTION: GLThread 419
E/AndroidRuntime( 4161): java.lang.UnsatisfiedLinkError: nativeTouchesBegin
E/AndroidRuntime( 4161): at org.cocos2dx.lib.Cocos2dxRenderer.nativeTouch
esBegin(Native Method)
E/AndroidRuntime( 4161): at org.cocos2dx.lib.Cocos2dxRenderer.handleActio
E/AndroidRuntime( 4161): at org.cocos2dx.lib.Cocos2dxGLSurfaceView$
E/AndroidRuntime( 4161): at android.opengl.GLSurfaceView$GLThread.guarded
E/AndroidRuntime( 4161): at android.opengl.GLSurfaceView$
W/ActivityManager( 196): Force finishing activity org.cocos2dx.application/.A
D/WindowManager( 196): adjustConfigurationLw, config:{1.0 0mcc0mnc (no locale)
layoutdir=0 sw800dp w1280dp h752dp xlrg land ?uimode ?night finger keyb/v/hna
v/v} mLidOpen:–1 mHasDockFeature:true mHasHallSensorFeature:true config.hardKeyb
D/dalvikvm( 561): GC_CONCURRENT freed 4243K, 47 free 10060K/18759K, paused 4ms
D/dalvikvm( 561): GC_FOR_ALLOC freed 469K, 48 free 9762K/18759K, paused 31ms
I/dalvikvm-heap( 561): Grow heap (frag case) to 11.438MB for 1958648-byte alloc
D/dalvikvm( 561): GC_FOR_ALLOC freed 1K, 38 free 11674K/18759K, paused 24ms
D/dalvikvm( 561): GC_FOR_ALLOC freed 2390K, 45 free 10382K/18759K, paused 23ms

D/dalvikvm( 561): GC_FOR_ALLOC freed 5K, 38 free 11633K/18759K, paused 21ms
D/OpenGLRenderer( 4161): Flushing caches (mode 0)
D/dalvikvm( 561): GC_CONCURRENT freed 324K, 31 free 12976K/18759K, paused 2ms+
D/dalvikvm( 561): GC_CONCURRENT freed 3465K, 39% free 11509K/18759K, paused 3ms
D/OpenGLRenderer( 4161): Flushing caches (mode 1)

Can anyone help?


Did you update cocos2d-x but not update corresponding java files?
The error seems that, java codes can not find corresponding c++ function.


Apologies but I have since found a work around to this.
I had to move the code from touchesjni.cpp in cocos2dx into the main.cpp file in the project jni folder.
Strange but it works.
Thanks for your reply