some error launch when run the "Demo of Bones-Android-Ninja"

Started by cefengxu, October 19, 2015, 10:54:16 AM

Previous topic - Next topic

cefengxu

Hello:

i have download the Demo( :Bones-Android-Ninja) and the "Bones",  and then finish the Setup on Eclipse, there are no error of the project now.
However, when i click " Run as -  Android Application ",  some error log will be shown as follow:

[2015-10-19 16:46:23 - Bones-Android-Ninja] Dx
trouble writing output: already prepared
[2015-10-19 16:46:24 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/threed/jpct/Animation;
[2015-10-19 16:46:24 - Bones-Android-Ninja] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/threed/jpct/Animation;

what's wrong with the code or the setup of the project ?
Thanks ~~!!!!

raft

this is caused by your eclipse setup. most possibly jpct.jar exist in 2 different locations. did you try importing Eclipse project that comes wih Bones demo into your workspace? (as opposed to make setup yourself)

cefengxu

Dear raft:
raft , thanks ~~

actually , my project setup as follown:
1- import "Bones-Android-Ninja" into the workspace; ( the log description "Project 'Bones-Android-Ninja' is missing required Java project: 'Bones' " )
2- so import the Bones into the workspace as well ;
3- this time , i do not change anything and run the application ;
the error log was shown (now is different):

10-19 17:21:32.436: E/AndroidRuntime(468): FATAL EXCEPTION: main
10-19 17:21:32.436: E/AndroidRuntime(468): Process: bones.samples.android, PID: 468
10-19 17:21:32.436: E/AndroidRuntime(468): java.lang.NoClassDefFoundError: com.threed.jpct.Config
10-19 17:21:32.436: E/AndroidRuntime(468):    at bones.samples.android.NinjaDemoActivity$MyRenderer.<init>(NinjaDemoActivity.java:369)
10-19 17:21:32.436: E/AndroidRuntime(468):    at bones.samples.android.NinjaDemoActivity.<init>(NinjaDemoActivity.java:63)
10-19 17:21:32.436: E/AndroidRuntime(468):    at java.lang.Class.newInstanceImpl(Native Method)
10-19 17:21:32.436: E/AndroidRuntime(468):    at java.lang.Class.newInstance(Class.java:1208)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2399)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2599)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.ActivityThread.access$900(ActivityThread.java:174)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.os.Handler.dispatchMessage(Handler.java:102)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.os.Looper.loop(Looper.java:146)
10-19 17:21:32.436: E/AndroidRuntime(468):    at android.app.ActivityThread.main(ActivityThread.java:5748)
10-19 17:21:32.436: E/AndroidRuntime(468):    at java.lang.reflect.Method.invokeNative(Native Method)
10-19 17:21:32.436: E/AndroidRuntime(468):    at java.lang.reflect.Method.invoke(Method.java:515)
10-19 17:21:32.436: E/AndroidRuntime(468):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
10-19 17:21:32.436: E/AndroidRuntime(468):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
10-19 17:21:32.436: E/AndroidRuntime(468):    at dalvik.system.NativeStart.main(Native Method)

raft

mm I dont know actually what is happening there. last time I tried importing the demo ptoject into Eclipse and also imported Bones as you did and it was working okey.

cefengxu

it's work ~! deal with as follown:

1- change the name of file of lib : revising from 'lib' to 'libs'
2- change the  build path of the jpct-ae.jar : right click -> Properties -> 'java build path' -> 'libraries' -> 'chage the path for jpct_ae.jar'

summary :  the android just know the 'libs' instead of 'lib' !

Additional Question:
this demo just add a Ninja again and again ??
My Purpose : To run a model with animation basic on android and see how dose the code do ???
Thx~~~

raft

cool, I'm glad you solved it.

you can add and remove ninjas with the buttons on the screen

cefengxu

nonono ~ just lots of  ninja stay there~

My purpose is 
" the ninja do some animation on the screen ~~"
"or how to use the sample code in project 'Bones' "


thx again raft ~~~

raft