Loading Bones on Android

Started by AGP, August 29, 2011, 10:02:52 AM

Previous topic - Next topic

AGP

"Remove Duplicate Vertices" (another one for the wiki!) did the trick. I'm up to 35 fps with both skeletal and pose animation (although it should be mentioned I must have exported pose wrong because I don't see the morphs happening so maybe it'll yet slow down but probably not).

amizorach

Hi All
I am trying to compile the android apllication with no success it seems I need to compile bones into the app is this correct.
Is there a readme/tutorial that explains how to set up the project on android


raft

Bones is just an ordinary library from Android's point of view. Just put bones.jar in your build bath.

for genaral jPCT and Android information have a look at:
http://www.jpct.net/wiki/index.php/Main_Page#jPCT-AE_-_a_port_of_jPCT_to_Android

amizorach

I tried to add the bones jar but am getting

[2011-09-09 02:10:12 - NinjaDemoActivity] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lraft/jpct/bones/Animated3D$VertexController;
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processClass(Main.java:372)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.access$400(Main.java:59)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processOne(Main.java:313)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.run(Main.java:185)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at java.lang.reflect.Method.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:585)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:490)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx 1 error; aborting
[2011-09-09 02:10:12 - NinjaDemoActivity] Conversion to Dalvik format failed with error 1

raft

NinjaDemo project depends on Bones project. so it already has all the necessary bones classes. if you add bones.jar to project, there becomes two copies bones classes. try either removing project dependency or removing bones.jar

amizorach

When you say depends on what do you mean

Whjat do I need to do to get ninjademo to compile for android

raft


amizorach

yes but when I try to build ninja without the bones.jar it is missing files

raft

what do you mean by build? run the project or?

amizorach

I dont know how but its working now
thanks