Author Topic: Please help with Ninja demo setup.  (Read 1321 times)

Offline moodroid

  • byte
  • *
  • Posts: 6
    • View Profile
Please help with Ninja demo setup.
« on: February 23, 2015, 01:56:08 am »
Hello.

I tried running the Ninja demo using Android Studio and the ADB.
I know it was an eclipse project originally.
after adding some libs to the project I got it to compile with no errors.
However, It crashed when I tried running it on my phone and tablet.

I caught a runtime exception, I don't have the stack text but it went something like:
"   version mismatch Current version = 3 and stream version = 4.  "
BonesIO has an int VERSION=4 so I think this is the source of the problem.
-What does this mean?

1.Is the bones.jar from the bones homepage compatible with the ninja demo files?
2.Would this demo work on Jellybeans and Kitkat or is it designed for Lollipop?

Any help will be much appreciated.

*after I get it to work then I will upload a complete android studio project if you guys are interested...



Offline moodroid

  • byte
  • *
  • Posts: 6
    • View Profile
Please help with Ninja demo setup. (stack)
« Reply #1 on: February 23, 2015, 08:01:35 am »
Hi again, attached is the error that I got.

Please ignore the long and useless package name "com.example.root.bonestry3.bones.samples.android.NinjaDemoActivity"
It is not the cause of the problem (the same errors also came up in my previous attempts to build this project)

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.root.bonestry3/com.example.root.bonestry3.bones.samples.android.NinjaDemoActivity}:

java.lang.RuntimeException: java.io.IOException: Version mismatch. Current version: 4, stream version: 3

            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
            at android.app.ActivityThread.access$900(ActivityThread.java:175)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5602)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)

**************************************************************************************************   
  Caused by: java.lang.RuntimeException: java.io.IOException: Version mismatch. Current version: 4, stream version: 3
            at com.example.root.bonestry3.bones.samples.android.NinjaDemoActivity.onCreate(NinjaDemoActivity.java:121)
**************************************************************************************************

            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
            at android.app.ActivityThread.access$900(ActivityThread.java:175)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5602)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)

**************************************************************************************************     
Caused by: java.io.IOException: Version mismatch. Current version: 4, stream version: 3
            at raft.jpct.bones.BonesIO.readHeader(BonesIO.java:104)
            at raft.jpct.bones.BonesIO.loadGroup(BonesIO.java:85)
***************************************************************************************************

            at com.example.root.bonestry3.bones.samples.android.NinjaDemoActivity.onCreate(NinjaDemoActivity.java:115)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
            at android.app.ActivityThread.access$900(ActivityThread.java:175)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5602)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)



Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1970
    • View Profile
    • http://www.aptalkarga.com
Re: Please help with Ninja demo setup.
« Reply #2 on: February 27, 2015, 03:36:01 am »
sorry for late answer.

1.Is the bones.jar from the bones homepage compatible with the ninja demo files?
yes, that is the cause:/ just copy Bones/samples/data/ninja/ninja.group.bones file to Android/res/raw folder.

2.Would this demo work on Jellybeans and Kitkat or is it designed for Lollipop?
it should work on Android 1.5 and later. but you need at least 2.2 for perforance (because of JIT)

*after I get it to work then I will upload a complete android studio project if you guys are interested...
sure, you can put it to wiki:)

Offline moodroid

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Please help with Ninja demo setup.
« Reply #3 on: March 01, 2015, 06:53:53 am »
Thanks, it worked like magic.
A happy little ninja is backflipping on my screen. :-)
I will try to upload the fixed Android studio project later on today.

Please let me know if there is anything I can do to help
the Bones project and community.



Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1970
    • View Profile
    • http://www.aptalkarga.com
Re: Please help with Ninja demo setup.
« Reply #4 on: March 01, 2015, 11:14:22 am »
i'm glad you solved it ;)

Offline moodroid

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Please help with Ninja demo setup.
« Reply #5 on: March 02, 2015, 06:07:46 pm »
Thanks for the help,

Project will soon be available on the JPCT wiki in the Bones subsection. (just as soon as I understand how to upload the zip there..)