Cocos2d-x v3.10 released

Hi there,

So I freshly downloaded the new “Cocos” product. I’ve successfully got it to compile for XCode using source code only. For the life of me the Precompiled libraries would not work. I’ve got the latest and greatest versions of XCode and OSX. This is starting from scratch (i.e. hitting new project, open in XCode, build and run).

Unfortunately I cannot get Android to work no matter what I try. Again I start from scratch and select “New Project”, C++, no extras, source code. When I open in Android studio it all builds, but when I run on my android device it says:

Unfortunately, libcocos2dx has stopped.

java.lang.UnsatisfiedLinkError: Couldn't load cocos2dcpp from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.cocos2dx.testapp-2.apk,libraryPath=/data/app-lib/org.cocos2dx.testapp-2]: findLibrary returned null

And if I run it on the default emulator: Nexus 5 API 23 x86

Unfortunately, libcocos2dx has stopped.

2-27 14:47:45.103 2445-2445/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: org.cocos2dx.testapp-2, PID: 2445
                                                 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.cocos2dx.testapp-2-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cocos2dx.testapp-2-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libcocos2dcpp.so"
                                                     at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                     at java.lang.System.loadLibrary(System.java:1076)
                                                     at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:249)
                                                     at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:264)
                                                     at android.app.Activity.performCreate(Activity.java:6237)
                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                     at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                     at android.os.Looper.loop(Looper.java:148)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Any help would be appreciated. I haven’t even begun trying to integrate my actual project – this is all running with what I assume is a hello world project.

P.S. the name “Cocos” makes it hard to search for other people’s issues on google relating to this GUI Project builder since other cocos projects come up first. For the sake of google searches maybe a unique name would help? For instance: Cocoscape or Cocosphere. Just a suggestion.

@jaunt you can currently only run fromAndroid Studio, but not compile. It’s crashing because you’re missing your game’s library.

To get it working you have to call the following command in your terminal:

cocos compile -p android --android-studio 

When it’s done compiling, you can run your project from Android Studio

Hi, I am having trouble with my Cocos2d-x v3.10. I am unsure of how to setup it and would really appreciate some help. Thanks

I have a problem loading a scene created with Cocos Studio.

If I use the callback feature http://cocos2d-x.org/documentation/editors_and_tools/chapter3/HowToCode/CallBack/en/index.html

auto rootNode = CSLoader::createNodeWithVisibleSize("MainScene.csb");

This always return NULL. But if I left the Advanced > Custom Class field blank, the scene loads normally.

Do you have a reported bug like this? Also a solution?

[SOLVED] Appearently in CSLoader.cpp 1052 the custom class appends the word Reader to find the reader. So if you put that name with the Reader word included (e.g. MyClassReader) it wont work.

        readername.append("Reader");

Can I suggest to update the documentation to make this point clearer. Thanks.

Hey,

did this release break something on the multi-resolution support?
when I try to get the screen resolution using glview->getFrameSize() on a iphone 6 device, it gives me iphone 5 resolution. This problem does not occur on cocos2d-3.9

Thanks,
NG

can you help me with this issue?cocos studio crashed

@newguy make sure you have the right sizes for launch images

This means that your Launch Images are wrong.

But I was using the default images provided by cocos2d-x?

but I was using the default images provided by cocos2d-x? BTW, why it has to be related to launch images?

what’s the solution for the wrong resolutions?

You need a launch Image for the various resolutions. https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html#//apple_ref/doc/uid/TP40006556-CH22-SW1

Hey @Maxxx

In case you haven’t figured it out yet.
It happens because the code in your Xcode project still points to the MainScene.ccb if I remember correctly
but I guess all your edited changes in Cocos Studio should be in some other ccb file.

So, load that .ccb file in your code.
It works fine, I am currently working on it.

Best,
Pabitra

Great! Looks like I am missing 375w-667h and 414w-736h. is it possible to let cocos2d-x include them just like other default images when we create a cocos2d-x project?

Actually you are missing 2 more, notice the last 2 in this screenshot…for iPhone 4and less support.
Here are mine finished minus iphone 4 support, finishing that this weekend.

I tested on every simulator and 4 different hardware devices. These work for everything.

Hi, can I deploy a Lua game on HTML 5 using this version?

There are misspell at http://cocos2d-x.org/filecenter/jsbuilder/
“Customized Version” -> “socketio” -> “ScoketIO library support”

word “ScoketIO” is invalid

Hi,
Just wondering has anyone got the remote debugging working on Xcode ver 7.2.1 and Firefox ver 44.0.2?

We’ve been following the instruction as per this page: http://www.cocos2d-x.org/wiki/Javascript_Remote_Debugging

But we could never get to start the debugger. Any idea?

For remote debugging use firefox version below 30.

Thanks…

On another note, I’m quite confused on how to load ttf for javascript?

I did this…
var fontDef = new cc.FontDefinition();
fontDef.fontName = “res/font/Arial_rounded.tff”;
fontDef.fontSize = 48;

var loginLabel = new cc.LabelTTF(‘Test’, fontDef);

But it is still using system font…