Cocos2dx - problem

Hello, i am new to Cocos2dx and i have problem. I compiled native code. And i created Android Project (here problems began). I shows errors in Cocos2dxAccelerometer.java and Cocos2dxGLSurfaceView.java.

Description Resource Path Location Type
ACTION\_MASK cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 283 Java Problem
ACTION\_MASK cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 391 Java Problem
ACTION\_POINTER\_DOWN cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 284 Java Problem
ACTION\_POINTER\_DOWN cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 393 Java Problem
ACTION\_POINTER\_ID\_SHIFT cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 285 Java Problem
ACTION\_POINTER\_ID\_SHIFT cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 321 Java Problem
ACTION\_POINTER\_ID\_SHIFT cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 396 Java Problem
ACTION\_POINTER\_UP cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 320 Java Problem
ACTION\_POINTER\_UP cannot be resolved or is not a field Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 394 Java Problem
The method afterTextChanged(Editable) of type TextInputWraper must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 65 Java Problem
The method beforeTextChanged(CharSequence, int, int, int) of type TextInputWraper must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 87 Java Problem
The method getPointerCount() is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 272 Java Problem
The method getPointerCount() is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 400 Java Problem
The method getPointerCount() is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 405 Java Problem
The method getPointerId(int) is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 278 Java Problem
The method getPointerId(int) is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 299 Java Problem
The method getPointerId(int) is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 335 Java Problem
The method getPointerId(int) is undefined for the type MotionEvent Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 402 Java Problem
The method getX() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 279 Java Problem
The method getX() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 286 Java Problem
The method getX() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 322 Java Problem
The method getX() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 403 Java Problem
The method getY() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 280 Java Problem
The method getY() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 287 Java Problem
The method getY() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 323 Java Problem
The method getY() in the type MotionEvent is not applicable for the arguments (int) Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 404 Java Problem
The method onAccuracyChanged(Sensor, int) of type Cocos2dxAccelerometer must override a superclass method Cocos2dxAccelerometer.java /GameAndroid/src/org/cocos2dx/lib line 97 Java Problem
The method onEditorAction(TextView, int, KeyEvent) of type TextInputWraper must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 98 Java Problem
The method onSensorChanged(SensorEvent) of type Cocos2dxAccelerometer must override a superclass method Cocos2dxAccelerometer.java /GameAndroid/src/org/cocos2dx/lib line 69 Java Problem
The method onTextChanged(CharSequence, int, int, int) of type TextInputWraper must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 94 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 190 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 203 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 251 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 260 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 291 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 305 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 314 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 327 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 341 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 350 Java Problem
The method run() of type new Runnable(){} must override a superclass method Cocos2dxGLSurfaceView.java /GameAndroid/src/org/cocos2dx/lib line 376 Java Problem

Can anyone help me with it? Thanks anyway.

I solved it :slight_smile:

Hi, it would be fantastic if you could say how you solved it. I’m having the same problem and other people might be as well.

Thank you

In the end I followed the tutorial at: http://gameit.ro/2011/08/creating-an-iphone-and-android-cocos2d-x-hybrid-project/

Following the various fixes in the comments to get it up and running (I don’t have Xcode3 like the author).

I saw other posts here suggesting to comment out the @override’s, but doing it like the above meant I didn’t need to comment out cocos2d-x code.

I am also having this problem. Does anybody know how to solve it?

-Nick Homme