Zay-es help needed on android?

Hi,
I have been working on a game for android using zay-es and have loved the flexibility it has offered so far. Till now I just tested the game on PC and it worked great. Today when I tested the game on android its popping an exception related to DefaultEntityData. The same code code works flawlessly on PC. Please point any useful directions to explore to fix this issue??

screenshot

Even for asteroid Panic on android, it says Unfortunately Asteroid panic has stopped??

What is the exception ?

I’m fixing the image link for you because no one seems to know about imgur…

Also, for stack traces it is better if you can just cut and paste them directly.

The exception indicates that the jar is not in the classpath. I don’t know what this means on Android but I know of at least one person who using Zay-es (and Lemur) on Android. @lwgeric if I got the spelling right.

Looks like the jar is not packed with the apk. Do you have a special build?
If you add the lib in your JME project it should be packed on build.

@nehlon
No, I’m simply building it as default by JME. I have imported the jar files of libraries in project settings and it works perfectly in desktop pc. I have nifty jar file imported as well and it works fine in android. zay-es has some problem. I will post the complete log in some time to diagnose the peoblem better.

Here is the log…
I contain some nifty related error as well. Please ignore them…

I’m still struggling with the same exception. Don’t know why it can’t see that class. I have included the jar library and it works perfectly on PC…

Screenshot of my libraries:

[java]I/System.out(15078): Hello Hello!!
E/dalvikvm(15078): Could not find class ‘com.simsilica.es.base.DefaultEntityData’, referenced from method threeD.entityComponents.EntityDataState.<init>
W/dalvikvm(15078): VFY: unable to resolve new-instance 1016 (Lcom/simsilica/es/base/DefaultEntityData;) in LthreeD/entityComponents/EntityDataState;
D/dalvikvm(15078): VFY: replacing opcode 0x22 at 0x0000
W/dalvikvm(15078): VFY: unable to find class referenced in signature (Lcom/simsilica/es/EntityData;)
I/dalvikvm(15078): Could not find method com.simsilica.es.EntityData.close, referenced from method threeD.entityComponents.EntityDataState.cleanup
W/dalvikvm(15078): VFY: unable to resolve interface method 11317: Lcom/simsilica/es/EntityData;.close ()V
D/dalvikvm(15078): VFY: replacing opcode 0x72 at 0x0002
W/dalvikvm(15078): VFY: unable to find class referenced in signature (Lcom/simsilica/es/EntityData;)
D/dalvikvm(15078): DexOpt: unable to opt direct call 0x2c43 at 0x02 in LthreeD/entityComponents/EntityDataState;.<init>
D/dalvikvm(15078): GC_CONCURRENT freed 714K, 35% free 8479K/12935K, paused 12ms+4ms, total 66ms
I/wpa_supplicant( 3903): [CTRL_IFACE]wlan0: SIGNAL_POLL
D/dalvikvm(15078): GC_CONCURRENT freed 718K, 35% free 8472K/12935K, paused 12ms+11ms, total 70ms
I/wpa_supplicant( 3903): [CTRL_IFACE]wlan0: SIGNAL_POLL
D/dalvikvm(15078): GC_CONCURRENT freed 710K, 35% free 8472K/12935K, paused 12ms+11ms, total 66ms
I/wpa_supplicant( 3903): [CTRL_IFACE]wlan0: SIGNAL_POLL[/java]

I included all the sources of the zay-es in the project’s sources directory and its working like a charm…
Thanks guys…

@simar.i3r said: I included all the sources of the zay-es in the project's sources directory and its working like a charm.. Thanks guys..

That’s not the solution. You need to sort out why the jars aren’t included in your android project or you will have this issue with other jars in the future. This is nothing Zay-ES specific.

Have you added that Zay-ES jar under the libraries section of the project tree or some other way?

I’ve tried this at least 3 different ways on Android and it works every time. You need to make sure you have Zay-ES.jar as well as the 3 jar files in Zay-ES/lib (guava, log4f, slf4j) added to your project, but other than that, it just works every time I try it on Android.

The issue lies right in the mobile folder as pspeed pointed out. I added all the jars properly in the libs folder (as mentioned in the pic) of the project but for no obvious reason I dont why only zay-es.jar is not being automatically copied in my mobile folder. Never mind my purpose is solved and its working with sources and even otherwise if I copy jar manually…

@simar.i3r said: I copy jar manually..

Glad it’s working for you, but there is some issue with your classpath, I suspect. The mobile-impl.xml file target “-copy-project-libs” looks at the variable “${run.classpath.without.build.classes.dir}” and copies the jars from the main project into the mobile libs directory. Then the target deletes only very desktop specific jars from the engine. Zay-ES.jar is obviously not one of these jars, so it remains in the mobile libs directory when the project is send to the Android SDK to be built into an APK.

I’ve never had that problem, so I’m not sure why it is happening.