I already added libcocos2dx to my project but when I try to compile my new project with eclipse, there are some errors.
jni/../../cocos2d/cocos/./platform/android/CCPlatformDefine.h:32:10: fatal error: 'android/log.h' file not found
#include "android/log.h"
^
:41:
In file included from jni/../../cocos2d/cocos/./base/CCRef.h:29:
In file included from jni/../../cocos2d/cocos/./base/CCPlatformMacros.h:33:
jni/../../cocos2d/cocos/./platform/android/CCPlatformDefine.h:32:10: fatal error: 'android/log.h' file not found
#include "android/log.h"
^
1 error generated.
make: [obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/AppDelegate.o] Error 1
make: Waiting for unfinished jobs....
1 error generated.
make: [obj/local/armeabi/objs/cocos2dcpp_shared/hellocpp/main.o] Error 1
make: Leaving directory `/Users/xavierlombard/Desktop/MyGameTest/CrazyFactory/proj.android'
Traceback (most recent call last):
The Selected NDK toolchain version was 4.8 !
I don’t know what to do, if someone has an answer, I would be really grateful to him.
I know this topic is old but i always get this issue.
Steps to fix if you´re using Eclipse to build Android layer:
Right click in project and go to PROPERTIES
Go to C/C++ General and then PATHS and SYMBOLS
Look at the ${NDK_ROOT}/ line and make sure you are using a existent platform on you ndk platform folder
eg. ${NDK_ROOT}/platforms/android-10/arch-arm/usr/include
Make sure you´re using the same Android platform or above in your cocos project.
I know this is an old post but i am kind of having the same issue. I tried the solution u mentioned but unfortunately it didn’t work for me.
Its giving me following error:
[armeabi] Compile++ thumb: frk-sdk-android <= FRKCC3DRender.cpp
In file included from jni/../../Source/frkcocos/FRKCC3DRender.cpp:12:
In file included from jni/../../Source/frkcocos/FRKCC3DRender.h:15:
jni/../../cocos2d/cocos/base\CCRef.h:29:10: fatal error: 'platform/CCPlatformMacros.h' file not found
#include "platform/CCPlatformMacros.h"
“platform/CCPlatformMacros.h” is present in the directory I have checked. I have no idea why it keeps giving me this error.
Its cocos own file and it cant find it.