look at @slackmoehrle
added support Android Studio 3.0+
Android Studio is the only official IDE for Google’s Android operating system.
Cocos2d-x supports Android Studio using NDK version r16 to r16. Gradle configurations have been updated, including simplifying Gradle PROP_* values, changing the deprecated compile to the new implementationin dependency declaration, and added Proguard configuration to reduce Release package size.
I think I could write something and update our docs. This question comes up a lot, is different on various platforms and would be beneficial to a lot of developers.
I’m not sure how many real devices we have floating around. I have one so perhaps I can. What are you looking for exactly? Just something running on the X demonstrating full screen mode and the safe area?
Now there is new version. I am confused how to upgrade my current project to new version of cocos2dx.? The only way I know is to copy all the source code and resources files to a new template created using coco2dx 3.17. or there is more elegant solution than this?
I do it the other way around. I have a shell script, which create me a new empty project and I replace the cocos folder from that empty project with the cocos folder in my game. Because I don’t alter the original sources, it will work fine. Sometimes I need to change root CMakeList and Android gradle files, but this is not very often.
I replace the cocos2d folder and then I create a cocos new project and do a diff on AppDelegate, RootViewController, etc, etc to see what code has changed and decide if I need to change it in my current projects.
I’m using 3.16, and I think the main thing I need is to update my game to work with iPhoneX. Is it possible to do this within 3.16, or better to just set aside some time and update to 3.17?
you really don’t need to update… all you need is a launch screen. I used storyboard for this matter.
You can find storyboard launch screen tutorials on youtube.
Thanks! I think I’ll have to create new background images, the upper scoreboard, and the tab bar, to fit the new aspect ratio. When I get a chance later, I’d like to share my current (very old) logic in how I detect whether I’m on iPhone 5, ipad, etc. Remember, I wrote the original cocos2d version some years back, so I know the approach changed after that.
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”