Having problems getting Android HelloWorld working...ndk r5c

I’m having some problems getting the HelloWorld app to run. I am using Android 2.1-update1 (as needed). I have built the object files using build_native.sh.
I have attached screenshot of the errors. Am I missing a step?


Screen_shot_2011-06-28_at_2.25.34_PM.png (177.7 KB)

I believe you have the same error as the link below.

Hmmm…got it work…then I got the latest git pull and now the native code is busted:

Compile++ thumb : cocos2d <= CCLabelAtlas.cpp
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp: In member function ‘virtual void cocos2d::CCLabelAtlas::updateAtlasValues()’:
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp:78: error: ‘m_nItemsPerRow’ was not declared in this scope
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp:88: error: ‘m_nItemWidth’ was not declared in this scope
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp:90: error: ‘m_nItemHeight’ was not declared in this scope
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp: In member function ’virtual void cocos2d::CCLabelAtlas::setString(const char**)‘:
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp:132: error: ’m_nItemWidth’ was not declared in this scope
/Users/terenctb/projects/cocos2d-x/HelloWorld/android/jni/…/…/…/cocos2dx/label_nodes/CCLabelAtlas.cpp:133: error: ‘m_nItemHeight’ was not declared in this scope
make:**** [/Users/terenctb/projects/cocos2d-x/HelloWorld/android/obj/local/armeabi/objs-debug/cocos2d/label_nodes/CCLabelAtlas.o] Error 1
~/projects/cocos2d-x/HelloWorld/android

Oh well…when it did the run performance seem awful as well…5-8FPS on HelloWorld…Ewww…Do I have the emulator set up wrong?

I’m very sure that m_nItemsPerRow, m_nItemWidth is declared in CCAtlasNode, and CCLabelAtlas inherit from it.
Please follow the wiki page [[How to run HelloWorld on ndk r4 and r5]] and take care of the LOCAL_C_INCLUDES in HelloWorld/android/jni/helloworld/Android.mk. If you’re using ndk r5, you don’t need to change anything, just run HelloWorld/android/build_natvie.sh, it will do everything

Sorry, terrible sorry! It’s my fault. The edge code on github cannot be build successfully, it’s semi-done in some feature.
Please use

git checkout tags/cocos2d-0.99.5-x-0.8.5

to get the last “stable” version.