A lot of Ndk errors in eclipse

Hi, when i tried to use jni i have lot of errors like,

‘args’ was not declared in this scope line 586, external location: /Applications/android-ndk-r8b/platforms/android-8/arch-arm/usr/include/jni.h

‘JavaVM’ does not name a type line 42, external location: /Users/Irfan/Documents/Irfan/cocos2d-2.0-x-2.0.4/cocos2dx/platform/android/jni/jniHelper.h

‘cocos2d::JniMethodInfo’ has a previous declaration as ‘typedef struct cocos2d::JniMethodInfo_ cocos2d::JniMethodInfo’ line 37, external location: /Users/Irfan/Documents/Irfan/cocos2d-2.0-x-2.0.4/cocos2dx/platform/android/jni/jniHelper.h

‘string’ in namespace ‘std’ does not name a type line 182, external location: /Users/Irfan/Documents/Irfan/cocos2d-2.0-x-2.0.4/cocos2dx/cocoa/CCDictionary.h

341 errors are occurring.

What m i doing wrong? i already have ndk attached with eclipse…

And the other thing i m facing that sometimes when i clean my project in eclipse my gen folder files have been gone…is it normal or problem?

help me i will be very thankful to you.:slight_smile:

Is this in the eclipse IDE or when you do a build?

If its just the IDE then you need to switch off some of the errors.

Check out this link if you have not already.
http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started
Just before the “What about the java code”

It is on both IDE and while build…
I have seen this link i tried everything that is in this link…but nothing helped me…So i made a new project and it is running but i m curious if i will use jni in this project, may be my project will crash again…