Cocos2d-x 3.0 Android Unresolved Inclusion on eclipse?

Cocos2d-x 3.0 Android Unresolved Inclusion on eclipse?
0.0 0


Please answer these questions to help fix this issue:
What’s the issue?
I have imported a clean new android project into eclipse and have imported the libcocos2dx. After doing all that I still get inclusion errors at the top of main.cpp with the following lines:

#include "AppDelegate.h"
#include "cocos2d.h"
#include "CCEventType.h"
#include "platform/android/jni/JniHelper.h"
#include jni.h
#include android/log.h

everything else seems fine. Does anyone know how to fix this problem? Thanks!

UPDATE: I have resolved the issues with #include jni.h and android/log.h by adding the include files from the ndk folder but I cannot find the include folder for cocos2dx…Does cocos2d-x 3.0 not have an include folder with it? Am I missing this include folder?




I am rather new to cocos2dx and I am trying this version. I had exactly the same problem.

And I am able to add the NDK include path in the C++ include paths, although I am not sure about the cocos2dx include path, but after a search in the file system I include it at: $(COCOS2DX_ROOT)/cocos/2d

But after this, despite the disappearance of include error, Symbol ‘cocos2d’ could not be resolved is reported in the “using namespace cocos2d” statement.

I have to it is not as easy as it seems/claims to get everything work. In fact it is quite frustrating during the whole process. I have been struggling set it up for quite a few days. At first I tried the cocos2dx 2.2.3 by following a post in the forum and other online documents. Everything was almost done until I opened Eclipse, when it repeatedly complained errors, I fixed several ones based on the error log. However there is one I cannot fix and even after I Google it, I still cannot figure it out.

So I now am trying cocos2dx 3.0rc. In fact it works much smoothly when I work it on command line. Now the only problem left is this symbol not resolved one.

Please can anyone help?