Slick Forums

Discuss the Slick 2D Library
It is currently Fri Aug 23, 2019 3:46 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Feb 27, 2012 7:38 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
I've run into an issue while attempting to draw an Animation on Android. It throws a NoClassDefFoundError: org.lwjgl.Sys when it tries to find Sys.getTime().

Code:
02-15 14:21:15.912: E/SLICK(319): java.lang.NoClassDefFoundError: org.lwjgl.Sys
02-15 14:21:15.912: E/SLICK(319):    at org.newdawn.slick.Animation.getTime(Animation.java:603)
02-15 14:21:15.912: E/SLICK(319):    at org.newdawn.slick.Animation.draw(Animation.java:371)
02-15 14:21:15.912: E/SLICK(319):    at org.newdawn.slick.Animation.draw(Animation.java:353)


Referencing a past forum post yields no useful information to me [LINK]

I am in the same situation as Makenshi was in, running the same platform and OS's:

Windows 7 64-bit
JDK 1.6
Android 2.3.3

Any help is greatly appreciated

EDIT: I also noticed this line in Logcat
Code:
02-27 14:49:55.565: D/dalvikvm(330): VFY: dead code 0x0003-000c in Lorg/newdawn/slick/Animation;.getTime ()J


Last edited by TheVapourRub on Tue Mar 20, 2012 2:12 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 8:32 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
It appears that sys.getTime is not supported on android. Instead, you could manually update animations. Once I figure out how to use the bitbucket repository and get the Slick-AE updates on there, I will try to find a working alternative for the android version of the animation class. Thanks for pointing this out.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Tue Mar 06, 2012 5:40 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
Thanks for your help again. Do you have a timeline at all for this?


Top
 Profile  
 
PostPosted: Wed Mar 07, 2012 12:23 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I think that System.currentTimeMillis() or System.elapsedRealtime() would make a good substitute. Sorry about the delay, I forgot about the animation issue. I've been trying to get Mercurial figured out, and have been reviewing the TiledMap path issue, and the animation got a bit lost. But if you want, I can try to have a fix in by next Wednesday (3/14).

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Fri Mar 09, 2012 4:55 am 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
That would be great. I'm gonna take another look at it too to see if I can figure something out.


Top
 Profile  
 
PostPosted: Sat Mar 10, 2012 4:17 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I have committed an updated animation class for android to the development branch of the Mercurial repository. I changed it to use System.nanoTime()/1000000 based on the information from this page: http://ninjacave.com/lwjglbasics4, and the fact that Sys.getTime() did not work on Android.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Mon Mar 12, 2012 4:20 am 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
Is there an address to the Mercurial repository? I only have the SVN for slick


Top
 Profile  
 
PostPosted: Mon Mar 12, 2012 4:30 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
TheVapourRub wrote:
Is there an address to the Mercurial repository? I only have the SVN for slick

https://bitbucket.org/kevglass/slick/src

Change the branch from "default" to "development".


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 2:13 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
Thanks!

It works great. I just have my issue with not being able to use new slick-ae jars in my project, so I copied the animation class into my package.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group