cocos2dx 3.8 - Android Port/Upgrade w/ Eclipse

I’m upgrading my game from 2.2.5 to 3.8. In 2.2.5 it runs on iPad, Android and WinTab just fine. I got it to work and run on the iPad for 3.8. I’m now tackling upgrading the Android port/config files. Worth noting I’m using Eclipse Juno.

I have gotten the test-cpp file to run, along with a blank hello world project. I’ve copied over my files, updated the Android.mk file and everything seems to be working fine (no errors, warnings, etc.). The only problem is that it’s not compiling the files at all into an .so so it crashes on the device.

I’ve clicked clean, build, build-clean, etc. Nothing happens. For hello world, the test-cpp, libcocos2dx, and my game there’s never any indication that it’s compiling anything at all in the console. Sometimes it worked, sometimes it didn’t. I have absolutely no idea if there’s an error in the code causing it to crash or not.

Is there any way to see what is going on with the python build? For the shell file before it would output it’s steps. If there isn’t, is there a way to go back to using the shell file? (My script was really nice and made my obb for me.)

Also please do not tell me to do it command line via the cocos method: for whatever reason it will always fail compiling there, even for the hello world and test-cpp projects (which, like I said, worked in eclipse).

Thanks.

Huuh, 2.2.5 to 3.8 it will not be that easy, but if you made it for iPad that it should work mostly for Android also.

Have you noticed biggest change in 3.8 ? now you should compile project by running console command in terminal, compile from eclipse I think now is impossible:)

cocos run -p android -j 4

Also if you made setup in eclipse it’s not guarantee to work in console if you connecting third_party SDK’s.

Like I said, using the cocos compile does not work.
It does not work for libcocos2dx, cpp-tests or the hello world project; all of which compiled fine through eclipse.
The project was made via the cocos new.

It should show progress in terminal, post your log

Using the command you posted before in the cmd prompt, this is the end result output:

The rest of the log was cut off but there was a lot of complaining about boundingBox().

The console in eclipse is empty if I try to build. Yes I’ve tried switching between views.

EDIT:: I’m on ndk r10b before anyone asks

Here’s running pyton build_native.py for my game.

Note I didn’t make any changes to this file.

Can you give bigger log from cocos run, current giving only warnings, can be that some method not suported or some file missing. click on cmd with mouse then select mark… Select with mouse and press enter to copy

EDIT:: Redirected it all to a text file so I caught it minus the warnings.

Updated project.properties
Updated local.properties
Updated file C:\Gataela-Side-A\Gataela\Gataela\proj.android\proguard-project.txt
It seems that there are sub-projects. If you want to update them
please use the --subprojects parameter.
Updated project.properties
Updated local.properties
Updated file C:\Gataela-Side-A\cocos\platform\android\java\proguard-project.txt
Updated project.properties
Updated local.properties
Updated file C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_licensing\library\proguard-project.txt
Updated project.properties
Updated local.properties
Updated file C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_apk_expansion\downloader_library\proguard-project.txt
Updated project.properties
Updated local.properties
Updated file C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_licensing\library\proguard-project.txt
make.exe: Entering directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'
[armeabi] Compile++ thumb: gataela_shared <= Constants.cpp
[armeabi] Compile++ thumb: gataela_shared <= SkitButton.cpp
[armeabi] Compile++ thumb: gataela_shared <= SlidingMenu.cpp
[armeabi] Compile++ thumb: gataela_shared <= SlidingMenuPage.cpp
make.exe: Leaving directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'
Running command: compile
Building mode: debug
Using Eclipse project : C:\Gataela-Side-A\Gataela\Gataela\proj.android
Android platform not specified, searching a default one...
running: '"C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools\android" update project -t android-10 -p C:\Gataela-Side-A\Gataela\Gataela\proj.android'

Android platform not specified, searching a default one...
running: '"C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools\android" update lib-project -p C:\Gataela-Side-A\cocos\platform\android\java -t android-10'

Android platform not specified, searching a default one...
running: '"C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools\android" update lib-project -p C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_licensing\library -t android-10'

Android platform not specified, searching a default one...
running: '"C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools\android" update lib-project -p C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_apk_expansion\downloader_library -t android-15'

Android platform not specified, searching a default one...
running: '"C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools\android" update lib-project -p C:\Users\Aoi\Desktop\adt-bundle-windows-x86_64-20140702\sdk\extras\google\play_licensing\library -t android-10'

Building native...
NDK build mode: debug
NDK_TOOLCHAIN_VERSION: 4.8
running: '"C:\Users\Aoi\Desktop\android-ndk-r10b\ndk-build" -C C:\Gataela-Side-A\Gataela\Gataela\proj.android -j4 NDK_MODULE_PATH=C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d;C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos;C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/external NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=1'

Error running command, return code: 2.

Also found a log file in .cocos

make.exe: Entering directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'
C:/Users/Aoi/Desktop/android-ndk-r10b/build/core/build-binary.mk:449: warning: overriding commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
C:/Users/Aoi/Desktop/android-ndk-r10b/build/core/build-binary.mk:449: warning: ignoring old commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
[armeabi] Gdbserver      : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
[armeabi] Compile++ thumb: gataela_shared <= Constants.cpp
[armeabi] Compile++ thumb: gataela_shared <= SneakyButton.cpp
[armeabi] Compile++ thumb: gataela_shared <= SneakyButtonSkinnedBase.cpp
[armeabi] Compile++ thumb: gataela_shared <= SneakyJoystick.cpp
jni/../../Classes/Components/SneakyButtonSkinnedBase.cpp: In member function 'void SneakyButtonSkinnedBase::setButton(SneakyButton*)':
jni/../../Classes/Components/SneakyButtonSkinnedBase.cpp:177:49: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
    button->setRadius(defaultSprite->boundingBox().size.width/2);
                                                 ^
In file included from jni/../../Classes/Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/Objects/GameItem.h:13,
                 from jni/../../Classes/Constants.h:14,
                 from jni/../../Classes/Constants.cpp:7:
jni/../../Classes/Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Constants.cpp: In static member function 'static configuration::data Constants::getConfig(std::string, std::string)':
jni/../../Classes/Constants.cpp:265:13: error: invalid conversion from 'long unsigned int*' to 'ssize_t* {aka int*}' [-fpermissive]
    &fileSize);
             ^
In file included from C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../platform/android/CCFileUtils-android.h:31:0,
                 from C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../base/ZipUtils.h:36,
                 from C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../cocos2d.h:59,
                 from jni/../../Classes/Constants.h:13,
                 from jni/../../Classes/Constants.cpp:7:
C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../platform/CCFileUtils.h:111:52: error:   initializing argument 3 of 'virtual unsigned char* cocos2d::FileUtils::getFileData(const string&, const char*, ssize_t*)' [-fpermissive]
     CC_DEPRECATED_ATTRIBUTE virtual unsigned char* getFileData(const std::string& filename, const char* mode, ssize_t *size);
                                                    ^
jni/../../Classes/Constants.cpp:265:13: warning: 'virtual unsigned char* cocos2d::FileUtils::getFileData(const string&, const char*, ssize_t*)' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../platform/CCFileUtils.h:111) [-Wdeprecated-declarations]
    &fileSize);
             ^
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
[armeabi] Compile++ thumb: gataela_shared <= SneakyJoystickSkinnedBase.cpp
[armeabi] Compile++ thumb: gataela_shared <= ThoughtBox.cpp
[armeabi] Compile++ thumb: gataela_shared <= MusicAndSFXList.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameEnemyHelper.cpp
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
make.exe: *** [obj/local/armeabi/objs-debug/gataela_shared/__/__/Classes/Constants.o] Error 1
make.exe: *** Waiting for unfinished jobs....
jni/../../Classes/Components/SneakyJoystickSkinnedBase.cpp: In member function 'void SneakyJoystickSkinnedBase::setJoystick(SneakyJoystick*)':
jni/../../Classes/Components/SneakyJoystickSkinnedBase.cpp:105:54: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
    joystick->setThumbRadius(thumbSprite->boundingBox().size.width/2);
                                                      ^
jni/../../Classes/Components/SneakyJoystickSkinnedBase.cpp:110:62: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
    joystick->setJoystickRadius(backgroundSprite->boundingBox().size.width/2);
                                                              ^
In file included from jni/../../Classes/Components/../Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/Components/../Objects/GameItem.h:13,
                 from jni/../../Classes/Components/../Constants.h:14,
                 from jni/../../Classes/Components/ThoughtBox.cpp:10:
jni/../../Classes/Components/../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Components/../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Components/ThoughtBox.cpp: In member function 'virtual bool ThoughtBox::init(std::deque<std::basic_string<char> >, std::string)':
jni/../../Classes/Components/ThoughtBox.cpp:43:30: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
    - name_label->boundingBox().size.height;
                              ^
jni/../../Classes/Components/ThoughtBox.cpp:65:32: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
   lpos = box_name->boundingBox().size.height + offsety;
                                ^
In file included from jni/../../Classes/Constants/Enemies/../../Objects/GameEnemy.h:11:0,
                 from jni/../../Classes/Constants/Enemies/GameEnemyHelper.h:12,
                 from jni/../../Classes/Constants/Enemies/GameEnemyHelper.cpp:9:
jni/../../Classes/Constants/Enemies/../../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Constants/Enemies/../../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:\Gataela-Side-A\Gataela\Gataela\proj.android\../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat" [enabled by default]
make.exe: Leaving directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'

Update: I got it to compile, run and deploy cpp-tests and a hello world project to the device via the cocos run -p android command. Same issues still with the game as seen above.

Last update for the night. I updated the ndk to r10e (the most up to date one). I still get the following issue:

    make.exe: Entering directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'
C:/Users/Aoi/Desktop/android-ndk-r10e/build/core/build-binary.mk:466: warning: overriding commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
C:/Users/Aoi/Desktop/android-ndk-r10e/build/core/build-binary.mk:466: warning: ignoring old commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'
[armeabi] Compile++ thumb: gataela_shared <= Constants.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameSkit.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameStatement.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameStats.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameTrigger.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameTroop.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameWeaponSpot.cpp
[armeabi] Compile++ thumb: gataela_shared <= GameWorldObject.cpp
In file included from jni/../../Classes/Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/Objects/GameItem.h:13,
                 from jni/../../Classes/Constants.h:14,
                 from jni/../../Classes/Constants.cpp:7:
jni/../../Classes/Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
In file included from jni/../../Classes/Objects/GameEvent.h:16:0,
                 from jni/../../Classes/Objects/GameWorldObject.cpp:9:
jni/../../Classes/Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Constants.cpp: In static member function 'static configuration::data Constants::getConfig(std::string, std::string)':
jni/../../Classes/Constants.cpp:265:13: error: invalid conversion from 'long unsigned int*' to 'ssize_t* {aka int*}' [-fpermissive]
    &fileSize);
             ^
In file included from C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../platform/android/CCFileUtils-android.h:31:0,
                 from C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../base/ZipUtils.h:36,
                 from C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../cocos2d.h:59,
                 from jni/../../Classes/Constants.h:13,
                 from jni/../../Classes/Constants.cpp:7:
C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../platform/CCFileUtils.h:111:52: note: initializing argument 3 of 'virtual unsigned char* cocos2d::FileUtils::getFileData(const string&, const char*, ssize_t*)'
     CC_DEPRECATED_ATTRIBUTE virtual unsigned char* getFileData(const std::string& filename, const char* mode, ssize_t *size);
                                                    ^
jni/../../Classes/Constants.cpp:265:13: warning: 'virtual unsigned char* cocos2d::FileUtils::getFileData(const string&, const char*, ssize_t*)' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../platform/CCFileUtils.h:111) [-Wdeprecated-declarations]
    &fileSize);
             ^
In file included from jni/../../Classes/Objects/GamePlayer.h:12:0,
                 from jni/../../Classes/Objects/GameSkit.h:14,
                 from jni/../../Classes/Objects/GameSkit.cpp:7:
jni/../../Classes/Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
[armeabi] Compile++ thumb: gataela_shared <= SkitHelper.cpp
In file included from jni/../../Classes/Objects/../Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/Objects/../Objects/GameItem.h:13,
                 from jni/../../Classes/Objects/../Constants.h:14,
                 from jni/../../Classes/Objects/GameWeaponSpot.cpp:9:
jni/../../Classes/Objects/../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Objects/GameSkit.cpp: In member function 'virtual bool GameSkit::init(int)':
jni/../../Classes/Objects/GameSkit.cpp:32:18: warning: 'virtual void cocos2d::Node::setZOrder(int)' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:160) [-Wdeprecated-declarations]
  box->setZOrder(4);
                  ^
jni/../../Classes/Objects/GameSkit.cpp:35:26: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
     if (box->boundingBox().size.width < CCDirector::getInstance()->getWinSize().width){
                          ^
jni/../../Classes/Objects/GameSkit.cpp:36:93: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         box->setPositionX((CCDirector::getInstance()->getWinSize().width - box->boundingBox().size.width)/2);
                                                                                             ^
jni/../../Classes/Objects/GameSkit.cpp:45:28: warning: 'void cocos2d::Layer::setTouchEnabled(bool)' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCLayer.h:179) [-Wdeprecated-declarations]
  this->setTouchEnabled(true);
                            ^
In file included from jni/../../Classes/Objects/GameEnemy.h:11:0,
                 from jni/../../Classes/Objects/GameTroop.h:11,
                 from jni/../../Classes/Objects/GameTroop.cpp:8:
jni/../../Classes/Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Objects/GameSkit.cpp: In member function 'void GameSkit::updateLine()':
jni/../../Classes/Objects/GameSkit.cpp:95:53: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
      sprite->setPosition(Point(-sprite->boundingBox().size.width, size.height / 2));
                                                     ^
jni/../../Classes/Objects/GameSkit.cpp:100:65: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
      sprite->setPosition(Point(size.width + sprite->boundingBox().size.width,
                                                                 ^
jni/../../Classes/Objects/GameSkit.cpp: In member function 'virtual void GameSkit::onTouchEnded(cocos2d::Touch*, cocos2d::Event*)':
jni/../../Classes/Objects/GameSkit.cpp:149:30: warning: 'void cocos2d::Layer::setTouchEnabled(bool)' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCLayer.h:179) [-Wdeprecated-declarations]
   this->setTouchEnabled(false);
                              ^
In file included from jni/../../Classes/Objects/../Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/Objects/../Objects/GameItem.h:13,
                 from jni/../../Classes/Objects/../Constants.h:14,
                 from jni/../../Classes/Objects/GameStats.cpp:9:
jni/../../Classes/Objects/../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Objects/../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
jni/../../Classes/Objects/GameSkit.cpp: In member function 'std::map<GamePlayer*, cocos2d::Vec2> GameSkit::setNewPositionsOUT(bool, std::map<GamePlayer*, cocos2d::Vec2>, int, SkitFace)':
jni/../../Classes/Objects/GameSkit.cpp:255:38: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
     pos = Point(-sprite->boundingBox().size.width, size.height / 2);
                                      ^
jni/../../Classes/Objects/GameSkit.cpp:257:50: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
     pos = Point(size.width + sprite->boundingBox().size.width,
                                                  ^
[armeabi] Compile++ thumb: gataela_shared <= Database.cpp
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
make.exe: *** [obj/local/armeabi/objs-debug/gataela_shared/__/__/Classes/Constants.o] Error 1
make.exe: *** Waiting for unfinished jobs....
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
In file included from jni/../../Classes/Skits/../Objects/GamePlayer.h:12:0,
                 from jni/../../Classes/Skits/../Objects/GameSkit.h:14,
                 from jni/../../Classes/Skits/SkitHelper.h:12,
                 from jni/../../Classes/Skits/SkitHelper.cpp:9:
jni/../../Classes/Skits/../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/Skits/../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
In file included from jni/../../Classes/SQLite/../Objects/BattleWheelItem.h:12:0,
                 from jni/../../Classes/SQLite/../Objects/GameItem.h:13,
                 from jni/../../Classes/SQLite/../Constants.h:14,
                 from jni/../../Classes/SQLite/Database.h:12,
                 from jni/../../Classes/SQLite/Database.cpp:8:
jni/../../Classes/SQLite/../Objects/GameCharacter.h: In member function 'float GameCharacter::getBoxShadowHeight()':
jni/../../Classes/SQLite/../Objects/GameCharacter.h:72:36: warning: 'virtual cocos2d::Rect cocos2d::Node::boundingBox() const' is deprecated (declared at C:/Gataela-Side-A/Gataela/Gataela/proj.android/../cocos2d/cocos/3d/../2d/CCNode.h:1163) [-Wdeprecated-declarations]
         return shadow->boundingBox().size.height/2;
                                    ^
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
cc1plus.exe: warning: unrecognized command line option "-Wno-extern-c-compat"
make.exe: Leaving directory `C:/Gataela-Side-A/Gataela/Gataela/proj.android'

As far as I can tell the only issue is this line:
cc1plus.exe: warning: unrecognized command line option “-Wno-extern-c-compat”

I found this thread where it said updating their ndk helped fix their problem, but in my case it doesn’t seem so.

EDIT:: I tried r10c and it didn’t work either.

This one was looking strange in your previous compile…try to add/change in Application.mk

NDK_TOOLCHAIN_VERSION := 4.9

Also why you not changing depreciated methods… check for new methods names, parameters and replace them in code:)

And it looks crashing because of this

I don’t know why do you think its an issue with NDK.

You get a compiler error in your file Constants.cpp, line 265. In this line you are trying to implicitly convert a variable with type long unsigned int* to a type ssize_t* which in your platform is int*. So the compiler is complaining about a non-safe conversion.
As the compiler already said, you can turn off this kind of errors using flag -fpermissive. I suggest you to go to Constants.cpp, line 265 and see what conversion is. If you are sure the conversion is safe, then simply use a reinterpret_cast or a plain C cast.

its not an issue with ndk :smile:

So it looked like there was two issues, thanks for pointing it out:

  1. That error which I completely missed (that used to work fine???)
  2. The NDK was out of date (I’m running r10c now)

It compiles and uploads to the device but now here’s a new issue:

09-18 21:30:15.062: E/AndroidRuntime(1705): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/package/base.apk"],nativeLibraryDirectories=[/data/app/package/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libcocos2dcpp.so"

I checked in Eclipse and I confirmed that libcocos2dx is linked as a library so I’m not sure what’s going on here. Gonna keep poking around.

In case anyone else runs into this: you need to make sure that in your AndroidManifest the name of the .so is correct.

So basically:

<!-- Tell Cocos2dxActivity the name of our .so -->
        <meta-data android:name="android.app.lib_name"
                  android:value="SO_NAME_HERE" />

Noticed it while comparing between the cpp-tests and the project.

Now for some good news since the game is running again now:

  1. I’m getting a better frame rate. It still bounces around a lot on Android (45-60) but it’s better than 20-30.
  2. It loads A LOT faster. I have some pretty big maps and before it would take 13-20 seconds to load them.

I’ll still need to optimize things (like draw calls), but it’s looking better now.

Now I just need to update everything to use the OBB files.