Author Topic: some error launch when run the "Demo of Bones-Android-Ninja"  (Read 14615 times)

Offline cefengxu

  • int
  • **
  • Posts: 65
    • View Profile
some error launch when run the "Demo of Bones-Android-Ninja"
« on: October 19, 2015, 10:54:16 am »
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 ~~!!!!

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #1 on: October 19, 2015, 10:58:03 am »
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)

Offline cefengxu

  • int
  • **
  • Posts: 65
    • View Profile
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #2 on: October 19, 2015, 11:22:45 am »
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)

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #3 on: October 19, 2015, 11:30:15 am »
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.

Offline cefengxu

  • int
  • **
  • Posts: 65
    • View Profile
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #4 on: October 19, 2015, 11:43:50 am »
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~~~

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #5 on: October 19, 2015, 11:46:06 am »
cool, I'm glad you solved it.

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

Offline cefengxu

  • int
  • **
  • Posts: 65
    • View Profile
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #6 on: October 19, 2015, 11:53:25 am »
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 ~~~

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #7 on: October 19, 2015, 12:27:09 pm »
try the menu button ;)

Offline cefengxu

  • int
  • **
  • Posts: 65
    • View Profile
Re: some error launch when run the "Demo of Bones-Android-Ninja"
« Reply #8 on: October 19, 2015, 12:34:52 pm »
thank you so much , raft~