At the moment there's still a little problem with spine here... :/
I exported my skeleton/animation to binary, and followed the instructions of this tutorial: link

On desktop it works perfectly fine, my character is drawn as I wanted. But when I try to test the thing on my android smartphone, it crashes immediatly on loading the .skel files with following reports:
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:395)
at com.android.ddmlib.Device.executeShellCommand(Device.java:462)
at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:110)
at java.lang.Thread.run(Unknown Source)
Here is the code how I am doing the stuff at the moment:

Variable definitions:
TextureAtlas skeletonAtlas;
SkeletonBinary skeletonBinary;
SkeletonData skeletonData;
Skeleton skeleton;
Animation animWalk;
Animation animRun;
Loading the atlas via the assetManager:
assetManager.load("data/char/native01/native01Tex.atlas", TextureAtlas.class);
Loading/Preparing the skeleton:
// ======== load skeleton ========
skeletonAtlas = assetManager.get("data/char/native01/native01Tex.atlas", TextureAtlas.class);
skeletonBinary = new SkeletonBinary(skeletonAtlas);
skeletonData = skeletonBinary.readSkeletonData(Gdx.files.internal("data/char/native01/skeleton.skel"));
animWalk = skeletonBinary.readAnimation(Gdx.files.internal("data/char/native01/skeleton-walk.anim"), skeletonData);
animRun = skeletonBinary.readAnimation(Gdx.files.internal("data/char/native01/skeleton-run.anim"), skeletonData);
skeleton = new Skeleton(skeletonData);
Is there anything I missed? ( Something like, there's no possibilty of using it via smartphones?! :shake: )

Btw: Is there also any good method for using the assetManager for spine skeletons, too?

Avatar utente
  • Messaggi: 3


That exception doesn't seem to be related to Spine? Spine should run fine on Android. Maybe you can find a better exception stacktrace? Just post the whole thing.

There is currently no asset loader to load skeletons and animations using AssetManager. This could be added though.
Avatar utente

  • Messaggi: 12040


Found the source. I thought I could pass the jar from the main project to the android project. But this didn't work. Now, after I located and linked the jar in the android libs, it works. Thanks! :)
Avatar utente
  • Messaggi: 3

Torna a Editor