Spine on Android Invisble 4.x

So I’ve been porting my old 2.x project to 4.x so I can get it working on Android and mostly going ok. But now I’ve integrated the Cocos2d-x V4 branch of Spine into it and the animations are invisible. The seem to load fine, get valid data etc, but nothing shows up on the screen. They play and show perfectly fine on the Windows build.
Any body else faced this issue? Any ideas what could be wrong with Android that causes it to be different to Windows?

Which branch are you referring to? The only Cocos2d-x V4 branch of Spine runtimes that I can recall is an old development version which you shouldn’t be using. The official version is the one here (branch 3.8), which works for both Cocos2d-x v3 and v4.

Also, how did you integrate the Spine runtime into your project?

If you are using the correct Spine runtimes, then which version of Android are you having issues with?

For my projects, Spine animations render correctly on Android devices, with a mix of Android 6/8/9/10.

I tried the main line one, but it didn’t build for me, then I found the custom cocos2d-x branch (https://github.com/EsotericSoftware/spine-runtimes/tree/cocos2dx-v4/spine-cocos2dx) and it did work. I will try and drop the 3.8 version in even though my files are 3.7 and see if that fixes anything.

Followed the instructions ran into hell with CMAKE and the other complex build nature of my project. All the guides were for the older Android Studio so I had to do lots of searching and random guessing to get it to link. However if it was a link or build issue then the code would fail as I step through it or do random things.

I’m running android 5 point something.

Now it crashes reading the Skins, looking at http://esotericsoftware.com/spine-json-format it seems 3.8 uses a different format for skins while it seems my data is 3.6.5. Do I really need to open and export 80 anims again…

Did anybody else need to rename spine/mathutil. For me on android it seemed to get mixed up with cocos/mathutil and cause all kinds of linker errors.

There was another thread related to Spine where I posted up a working demo project with the latest Spine runtimes. Download it and see what differences you may have in your project. You’ll just need to copy over the Cocos2d-x V4 cocos2d folder into it to build it. Also, there is a batch file in there, VSUpdateCMake.bat, which you can run, and it will create the CMake project for Visual Studio 2019 (if that’s what you’re using). There is also an entry in there for creating the project for VS2017 in case you need it, but it’s commented out.

You can find it here: https://discuss.cocos2d-x.org/t/spine-skeletonanimation/50918/9?u=r101

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.