Cocos2d-x v3.17 released!

Cocos2d-x v3.17 released!
0.0 0

#23

I can’t compile android with “cocos compile -p android --android-studio”, “cocos compile -p android --android”, “cocos compile -p android”

I have error:
[armeabi-v7a] Compile++ thumb: cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2d_js_static <= jsb_cocos2dx_3d_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2d_js_static <= jsb_cocos2dx_extension_auto.cpp
In file included from E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/auto/jsb_cocos2dx_3d_auto.cpp:1:
In file included from E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/3d/…\scripting/js-bindings/auto/jsb_cocos2dx_3d_auto.hpp:5:
E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/…/…/…/external/spidermonkey/prebuilt/android/…/…/include/android\jsapi.h:12:10: fatal error: ‘mozilla/FloatingPoint.h’ file not found
#include “mozilla/FloatingPoint.h”
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/auto/jsb_cocos2dx_extension_auto.cpp:1:
In file included from E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/3d/…\scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp:5:
E:/HocTap/CocosJsWorkspaces/DownloadResources/frameworks/runtime-src/proj.android/app/jni/…/…/…/…/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/…/…/…/external/spidermonkey/prebuilt/android/…/…/include/android\jsapi.h:12:10: fatal error: ‘mozilla/FloatingPoint.h’ file not found
#include “mozilla/FloatingPoint.h”
^~~~~~~~~~~~~~~~~~~~~~~~~

I create project with cmd “cocos new DownloadResources -p com.tunt.downloadresources -l js -d E:
\HocTap\CocosJsWorkspaces”

I using NDK r16b


#24

long path error on Windows platforms, you can move you JS project into E:/ for a temp solution. Some header files is so depth.


#25

Thank you for reply.

I have fix above error because I compile it using NDK R16, after upgrade NDK from R16 to R17, I was compile completed.


#26

That’s amazing, NDK R17 solve this long path issue on windows platform.


#27

Actually r17 doesn’t solve long path issue, if the path length large than 260, the ndk compile system will abort.


#28

what’s the solution for this long path error, should we adapt the struct of folder to avoid this issue?


#29

there is the solution:

finally:
Now, this solution now support clang or gcc at windows7 & windows 10 platform.

Android Studio + ndk-r17 + cocos2d-x-3.17 cpp-empty-test:

No patch installed:

With patch installed:

How to install this patch:
1: set env var ANDROID_NDK_ROOT to your ndk-bundle directory
2: right click ndk-wsls-2.0-final/install.bat, run as administrator.


#30

I have attempt to use but it has no effect


#31

I don’t an error while using cocos-2dx v3.16 & ndk r14b


#32

I ran into a problem while running cpp-tests:

After first call to addPhysics3DConstraint(), app crashes on exit

I created an issue on GitHub: https://github.com/cocos2d/cocos2d-x/issues/18864


#33

Help, after i upgrade my cocos2dx version there are 2 error in my code.

1 - No match Function in MenuItemImage::create

auto Setting = MenuItemImage::create("res/Setting.png", "res/SettingP.png",
                                     CC_CALLBACK_1(MenuScene::settingFunc, this));

2 - class ‘std::_bind<bool(intro::*)(Touch *, Event *), intro *, const std::Placeholders::_ph<1> &, const std::placeholders::_ph<2>’ is not compatible with class EventlistenerTouchOnebyOne::ccTouchBegan

auto listener = EventListenerTouchOneByOne::create();
listener->setSwallowTouches(true);
listener->onTouchBegan = CC_CALLBACK_2(intro::onTouchBegan, this);  //error
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);

in bool onTouchBegan :

bool intro::onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *event) {
if (ss == 0) {
    starts();
    ss++;
}
return true;

}

in starts:

void intro::starts() {
auto scene = MenuScene::createScene();
Director::getInstance()->pushScene(scene);

}


#34

I tried that, but it didn’t work. I wonder if my whole AppDelegate code (which is several years old) is wrong. I’m going to try this next: