Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 4:18 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Mon Jul 11, 2011 11:35 am 
Offline

Joined: Sat Apr 24, 2010 9:49 pm
Posts: 42
Hi,
the eclipse android plugin logcat shows up this problem when my slick2d game try to update an animation on android:

java.lang.NoClassDefFoundError: org.lwjgl.Sys
at org.newdawn.slick.Animation.getTime(Animation.java:603)
at org.newdawn.slick.Animation.draw(Animation.java:367)
at org.newdawn.slick.Animation.draw(Animation.java:349)
...

here's the naughty guilty method:

* @return The system time in milliseconds
*/
private long getTime() {
return (Sys.getTime() * 1000) / Sys.getTimerResolution();
}

This problem appear only on android.

Are you experiencing the same problem? Can anyone help?

Thanks

_________________
www.arcadator.com - free online games


Last edited by accion mutante on Sat Jul 30, 2011 7:05 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 11, 2011 7:39 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Either it is really missing the lwjgl.jar (unlikely) or it failed to load the natives (more likely) - in which case the real reason is displayed as the cause of the exception (which you cut off).

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 11, 2011 11:56 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
if it's on android, opengl should be handled by libgdx. do you have gdx.jar, gdx-backend-android.jar, and the folders armeabi and armeabi-v7a in the libs folder and on the build path?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 15, 2011 9:41 am 
Offline

Joined: Sat Apr 24, 2010 9:49 pm
Posts: 42
Hi,

yes gdx-backend-android.jar, gdx.jar, slick-ae.jar are in the libs folder and are added to the build path.
The two armeabi folders are also in the libs folder but not really added to the build path, and if they have to be I don't know how to do this.
The best I can do is to set them to "use as source folder" which makes a duplicate files error.

And yes the error appears only on android and only when an Animation class child is called.

here's the complete error log:

07-15 09:26:30.147: ERROR/SLICK(370): java.lang.NoClassDefFoundError: org.lwjgl.Sys
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.Animation.getTime(Animation.java:603)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.Animation.draw(Animation.java:367)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.Animation.draw(Animation.java:349)
07-15 09:26:30.147: ERROR/SLICK(370): at sprite_classes.Sprite.draw(Sprite.java:134)
07-15 09:26:30.147: ERROR/SLICK(370): at main_package.GameplayState.render(GameplayState.java:203)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.state.StateBasedGame.render(StateBasedGame.java:199)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:541)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
07-15 09:26:30.147: ERROR/SLICK(370): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
07-15 09:26:30.147: ERROR/SLICK(370): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-15 09:26:30.147: ERROR/SLICK(370): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
07-15 09:26:30.147: ERROR/SLICK(370): Failed to render/update
07-15 09:26:30.147: ERROR/SLICK(370): org.newdawn.slick.SlickException: Game.render() failure - check the game code.
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:544)
07-15 09:26:30.147: ERROR/SLICK(370): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
07-15 09:26:30.147: ERROR/SLICK(370): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
07-15 09:26:30.147: ERROR/SLICK(370): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-15 09:26:30.147: ERROR/SLICK(370): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
07-15 09:26:30.208: WARN/dalvikvm(370): threadid=9: thread exiting with uncaught exception (group=0x40015560)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): FATAL EXCEPTION: GLThread 10
07-15 09:26:30.217: ERROR/AndroidRuntime(370): java.lang.RuntimeException: org.newdawn.slick.SlickException: Game.render() failure - check the game code.
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:160)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): Caused by: org.newdawn.slick.SlickException: Game.render() failure - check the game code.
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:544)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
07-15 09:26:30.217: ERROR/AndroidRuntime(370): ... 3 more
07-15 09:26:30.227: WARN/ActivityManager(60): Force finishing activity org.newdawn.slick.android/.MyGameActivity

_________________
www.arcadator.com - free online games


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 23, 2011 10:19 am 
Offline

Joined: Sat Apr 24, 2010 9:49 pm
Posts: 42
Resolved, I moved on a 64bit machine. Then I had to keep lwjgl up to date in the Slick project and assign the correct path to lwjgl.jar library...

_________________
www.arcadator.com - free online games


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 23, 2011 12:03 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Or you do this way:
http://slick.cokeandcode.com/wiki/doku. ... _libraries

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2011 8:10 am 
Offline

Joined: Mon Feb 16, 2009 11:33 am
Posts: 16
Mr. Kenkron wrote:
if it's on android, opengl should be handled by libgdx. do you have gdx.jar, gdx-backend-android.jar, and the folders armeabi and armeabi-v7a in the libs folder and on the build path?


Hi,

I have the same problem Accion mutante had and I really can't find what is wrong with my application.

If I just display an image or a string on the screen it will be fine but as soon as I am using Animation the application crashes and I have this error complaining about the missing class org.lwjgl.Sys.

Mr. Kenkron,

I followed your tutorial to setup my environment and everything. Thank you very much for that. It's very helpful.

If android systems should use libgdx instead of lwjgl, do you know why it is complaining about lwjgl?

I develop under Windows 7 64bits and I already tried updating to the latest version of LWJGL, LibGDX, Slick and Slick-AE.

Accion mutante,

Do you know exactly what is the action you made for not having this problem anymore?

R.D.,

Is it really possible to apply this solution for android? I don't think it is necessary to tell which system we are running on for android since we simply have folders armeabi and armeabi-v7a for android native.

Thank you,
Makenshi


Last edited by Makenshi on Thu Sep 08, 2011 7:37 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2011 9:05 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Dunno, my Tablet still waits for me at the shop so I had no chance to test it. But I thought someone might test it and tell me it it works ;)

btw nice to see you around here maki :D

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2011 1:26 pm 
Offline

Joined: Mon Feb 16, 2009 11:33 am
Posts: 16
Understood :wink:

I will most certainly spend another night on trying to make these animation work (unless someone has a brilliant idea to help me here) so I could try your suggestion but honestly I don't think it has any chance to work on Android since we do not have one directory per operating system as opposed to what we have for applications.

Nice to see you too and glad to learn you'll be the next person to play with android systems and Slick. I truly believe this is a wondering development environment!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2011 11:00 pm 
Offline

Joined: Mon Feb 16, 2009 11:33 am
Posts: 16
Hi again,

I'm still not able to play any Slick Animation on Android but may be someone among you will be able to reproduce the problem and hopefully will have a way to fix it.

Here is my development environment:
- Windows 7 64bits
- jdk1.6.0_24 for Windows 7 64bits
- Eclipse 3.7.0 for Windows 7 64bits
- SDK Platform Android 2.3.3 - API 10 for Any Platform

I'm also working with the latest version of Slick and Slick-AE from the SVN repository (https://bob.newdawnsoftware.com/repos/slick/trunk) (revision 1559). I used the build.xml to generate the slick-ae.jar file so I can run without troubles the example project Slick-Android-Test.

But within that example project, if I just use the following class instead of the Puzzle one, I get the error message complaining about missing org.lwjgl.Sys class.

Code:
package animation.test;

import org.newdawn.slick.Animation;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

public class AndroidAnimationTest extends BasicGame {
   /** The images of the different kats */
   private Image[] kitis = new Image[9];
   /** The animation for the unstable morphing kitty */
   private Animation animation;
   
   /** The container holding the Animation Test */
   private GameContainer container;
      
   /**
    * Create a new Animation Test instance
    */
   public AndroidAnimationTest() {
      super("Animation Test");
   }

   /**
    * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
    */
   public void init(GameContainer container) throws SlickException {
      this.container = container;
      
      container.setShowFPS(false);
      container.setVSync(true);
      container.setVerbose(false);
      
      container.setIcon("res/icon.png");
      container.setMouseCursor("res/cursor.png", 5, 2);
      
      for (int i = 0; i < kitis.length; i++) {
         kitis[i] = new Image("res/" + (i + 1) + ".png");
      }
      
      animation = new Animation(kitis, 50);
   }

   /**
    * @see org.newdawn.slick.BasicGame#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
    */
   public void render(GameContainer container, Graphics g) throws SlickException {
      float x = 10f;
      float y = 10f;
      
      for (int i = 0; i < kitis.length; i++) {
         g.drawImage(kitis[i], x, y, Color.white);
         x += 10f;
      }
      
      animation.draw(50f, 50f);
   }
   
   /**
    * @see org.newdawn.slick.BasicGame#update(org.newdawn.slick.GameContainer, int)
    */
   public void update(GameContainer container, int delta) throws SlickException {
   }
   
   /**
    * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
    */
   public void keyPressed(int key, char c) {
      if (key == Input.KEY_ESCAPE) {
         container.exit();
      }
   }

   
   /**
    * @see org.newdawn.slick.BasicGame#mousePressed(int, int, int)
    */
   public void mousePressed(int button, int x, int y) {
   }
   
   /**
    * Entry point into our game. Simple bootstrap for the container and fire
    * the game off.
    *
    * @param argv The arguments passed into the game
    */
   public static void main(String[] argv) {
      try {
         AppGameContainer container = new AppGameContainer(new AndroidAnimationTest());
         container.start();
      } catch (SlickException e) {
         e.printStackTrace();
      }
   }
}


Off course, file SlickTestActivity.java becomes:

Code:
package org.newdawn.slick.android;

import org.newdawn.slick.SlickActivity;

import android.os.Bundle;
import animation.test.AndroidAnimationTest;

/**
* A simple test activity to show bootstrapping a Slick Game implementation
* into android.
*
* @author kevin
*/
public class SlickTestActivity extends SlickActivity {
   /*
    * (non-Javadoc)
    * @see android.app.Activity#onCreate(android.os.Bundle)
    */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       
        //start(new TestGDXContainer(), 800, 480);
        //start(new Puzzle(), 640, 480);
        start(new AndroidAnimationTest(), 640, 480);
    }
}


If I just remove the line requesting to draw the animation, I get no issue and the individual images for the kitten are properly displayed.
But if I leave it like that, the android application crashes and give me the following stack trace within LogCat:

09-08 22:40:33.828: DEBUG/AndroidRuntime(384): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-08 22:40:33.828: DEBUG/AndroidRuntime(384): CheckJNI is ON
09-08 22:40:34.507: DEBUG/AndroidRuntime(384): Calling main entry com.android.commands.pm.Pm
09-08 22:40:34.687: DEBUG/dalvikvm(259): GC_EXPLICIT freed 3K, 54% free 2545K/5511K, external 1625K/2137K, paused 56ms
09-08 22:40:34.697: WARN/ActivityManager(60): No content provider found for:
09-08 22:40:34.907: WARN/ActivityManager(60): No content provider found for:
09-08 22:40:34.917: DEBUG/PackageParser(60): Scanning package: /data/app/vmdl752973159.tmp
09-08 22:40:35.567: INFO/PackageManager(60): Removing non-system package:org.newdawn.slick.android
09-08 22:40:35.567: INFO/ActivityManager(60): Force stopping package org.newdawn.slick.android uid=10036
09-08 22:40:35.677: DEBUG/PackageManager(60): Scanning package org.newdawn.slick.android
09-08 22:40:35.677: INFO/PackageManager(60): Package org.newdawn.slick.android codePath changed from /data/app/org.newdawn.slick.android-1.apk to /data/app/org.newdawn.slick.android-2.apk; Retaining data and using new
09-08 22:40:35.687: INFO/PackageManager(60): Unpacking native libraries for /data/app/org.newdawn.slick.android-2.apk
09-08 22:40:35.828: DEBUG/installd(34): DexInv: --- BEGIN '/data/app/org.newdawn.slick.android-2.apk' ---
09-08 22:40:38.287: DEBUG/dalvikvm(393): DexOpt: load 227ms, verify+opt 1687ms
09-08 22:40:38.347: DEBUG/installd(34): DexInv: --- END '/data/app/org.newdawn.slick.android-2.apk' (success) ---
09-08 22:40:38.347: WARN/PackageManager(60): Code path for pkg : org.newdawn.slick.android changing from /data/app/org.newdawn.slick.android-1.apk to /data/app/org.newdawn.slick.android-2.apk
09-08 22:40:38.347: WARN/PackageManager(60): Resource path for pkg : org.newdawn.slick.android changing from /data/app/org.newdawn.slick.android-1.apk to /data/app/org.newdawn.slick.android-2.apk
09-08 22:40:38.347: DEBUG/PackageManager(60): Activities: org.newdawn.slick.android.SlickTestActivity
09-08 22:40:38.367: INFO/ActivityManager(60): Force stopping package org.newdawn.slick.android uid=10036
09-08 22:40:38.498: INFO/installd(34): move /data/dalvik-cache/data@app@org.newdawn.slick.android-2.apk@classes.dex -> /data/dalvik-cache/data@app@org.newdawn.slick.android-2.apk@classes.dex
09-08 22:40:38.498: DEBUG/PackageManager(60): New package installed in /data/app/org.newdawn.slick.android-2.apk
09-08 22:40:38.637: INFO/ActivityManager(60): Force stopping package org.newdawn.slick.android uid=10036
09-08 22:40:38.727: DEBUG/dalvikvm(60): GC_EXPLICIT freed 861K, 48% free 4332K/8263K, external 3511K/3903K, paused 87ms
09-08 22:40:38.858: DEBUG/dalvikvm(186): GC_EXPLICIT freed 119K, 52% free 2756K/5703K, external 1625K/2137K, paused 96ms
09-08 22:40:38.937: WARN/RecognitionManagerService(60): no available voice recognition services found
09-08 22:40:39.207: DEBUG/dalvikvm(60): GC_EXPLICIT freed 242K, 49% free 4259K/8263K, external 3511K/3903K, paused 91ms
09-08 22:40:39.207: DEBUG/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol
09-08 22:40:39.207: INFO/installd(34): unlink /data/dalvik-cache/data@app@org.newdawn.slick.android-1.apk@classes.dex
09-08 22:40:39.237: DEBUG/AndroidRuntime(384): Shutting down VM
09-08 22:40:39.257: DEBUG/dalvikvm(384): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 1ms+1ms
09-08 22:40:39.257: DEBUG/jdwp(384): Got wake-up signal, bailing out of select
09-08 22:40:39.257: DEBUG/dalvikvm(384): Debugger has detached; object registry had 1 entries
09-08 22:40:39.887: DEBUG/AndroidRuntime(398): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-08 22:40:39.897: DEBUG/AndroidRuntime(398): CheckJNI is ON
09-08 22:40:40.647: DEBUG/AndroidRuntime(398): Calling main entry com.android.commands.am.Am
09-08 22:40:40.687: INFO/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=org.newdawn.slick.android/.SlickTestActivity } from pid 398
09-08 22:40:40.838: INFO/ActivityManager(60): Start proc org.newdawn.slick.android for activity org.newdawn.slick.android/.SlickTestActivity: pid=406 uid=10036 gids={}
09-08 22:40:40.847: DEBUG/AndroidRuntime(398): Shutting down VM
09-08 22:40:40.877: DEBUG/dalvikvm(398): GC_CONCURRENT freed 103K, 69% free 320K/1024K, external 0K/0K, paused 1ms+1ms
09-08 22:40:40.877: DEBUG/dalvikvm(398): Debugger has detached; object registry had 1 entries
09-08 22:40:40.917: INFO/dalvikvm(398): JNI: AttachCurrentThread (from ???.???)
09-08 22:40:40.917: INFO/AndroidRuntime(398): NOTE: attach of thread 'Binder Thread #3' failed
09-08 22:40:41.197: INFO/WindowManager(60): Setting rotation to 1, animFlags=1
09-08 22:40:41.197: INFO/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=9}
09-08 22:40:41.467: WARN/System.err(406): GdxNativesLoader: Couldn't unpack and load native 'libgdx.so'
09-08 22:40:41.467: DEBUG/dalvikvm(406): Trying to load lib /data/data/org.newdawn.slick.android/lib/libgdx.so 0x40515600
09-08 22:40:41.479: DEBUG/dalvikvm(406): Added shared lib /data/data/org.newdawn.slick.android/lib/libgdx.so 0x40515600
09-08 22:40:41.479: DEBUG/dalvikvm(406): No JNI_OnLoad found in /data/data/org.newdawn.slick.android/lib/libgdx.so 0x40515600, skipping init
09-08 22:40:41.507: ERROR/SLICK(406): Slick-AE 0
09-08 22:40:41.767: INFO/ActivityManager(60): Displayed org.newdawn.slick.android/.SlickTestActivity: +942ms
09-08 22:40:41.817: INFO/dalvikvm(60): Jit: resizing JitTable from 1024 to 2048
09-08 22:40:41.987: DEBUG/libEGL(406): egl.cfg not found, using default config
09-08 22:40:41.987: DEBUG/libEGL(406): loaded /system/lib/egl/libGLES_android.so
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): OGL renderer: Android PixelFlinger 1.4
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): OGL vendor: Android
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): OGL version: OpenGL ES-CM 1.0
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): OGL extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): framebuffer: (5, 6, 5, 0)
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): depthbuffer: (16)
09-08 22:40:42.137: DEBUG/AndroidGraphics(406): stencilbuffer: (0)
09-08 22:40:42.167: ERROR/SLICK(406): Starting display 640x480 800x480
09-08 22:40:42.167: ERROR/SLICK(406): Requesting: defaultfont.png
09-08 22:40:42.337: ERROR/SLICK(406): Requesting: defaultfont.fnt
09-08 22:40:42.337: ERROR/SLICK(406): Fail: Unsupported: glGenLists
09-08 22:40:42.558: WARN/IInputConnectionWrapper(135): showStatusIcon on inactive InputConnection
09-08 22:40:42.737: ERROR/SLICK(406): Creating application: org.newdawn.slick.android.SlickTestActivity@4051d020
09-08 22:40:42.747: ERROR/SLICK(406): Requesting: res/1.png
09-08 22:40:42.797: ERROR/SLICK(406): Requesting: res/2.png
09-08 22:40:42.857: ERROR/SLICK(406): Requesting: res/3.png
09-08 22:40:42.898: ERROR/SLICK(406): Requesting: res/4.png
09-08 22:40:42.947: ERROR/SLICK(406): Requesting: res/5.png
09-08 22:40:43.027: DEBUG/dalvikvm(406): GC_EXTERNAL_ALLOC freed 410K, 50% free 3107K/6151K, external 2121K/2137K, paused 72ms
09-08 22:40:43.067: ERROR/SLICK(406): Requesting: res/6.png
09-08 22:40:43.117: ERROR/SLICK(406): Requesting: res/7.png
09-08 22:40:43.157: ERROR/SLICK(406): Requesting: res/8.png
09-08 22:40:43.197: ERROR/SLICK(406): Requesting: res/9.png
09-08 22:40:43.257: INFO/dalvikvm(406): Could not find method org.lwjgl.Sys.getTime, referenced from method org.newdawn.slick.Animation.getTime
09-08 22:40:43.257: WARN/dalvikvm(406): VFY: unable to resolve static method 5193: Lorg/lwjgl/Sys;.getTime ()J
09-08 22:40:43.257: DEBUG/dalvikvm(406): VFY: replacing opcode 0x71 at 0x0000
09-08 22:40:43.257: DEBUG/dalvikvm(406): VFY: dead code 0x0003-000c in Lorg/newdawn/slick/Animation;.getTime ()J
09-08 22:40:43.307: INFO/ARMAssembler(406): generated scanline__00000177:03545444_00009501_00000000 [160 ipp] (216 ins) at [0x446e61e8:0x446e6548] in 2419349 ns
09-08 22:40:43.327: ERROR/SLICK(406): java.lang.NoClassDefFoundError: org.lwjgl.Sys
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.Animation.getTime(Animation.java:603)
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.Animation.draw(Animation.java:367)
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.Animation.draw(Animation.java:349)
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.Animation.draw(Animation.java:326)
09-08 22:40:43.327: ERROR/SLICK(406): at animation.test.AndroidAnimationTest.render(AndroidAnimationTest.java:61)
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:541)
09-08 22:40:43.327: ERROR/SLICK(406): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
09-08 22:40:43.327: ERROR/SLICK(406): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
09-08 22:40:43.327: ERROR/SLICK(406): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
09-08 22:40:43.327: ERROR/SLICK(406): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
09-08 22:40:43.337: ERROR/SLICK(406): Failed to render/update
09-08 22:40:43.337: ERROR/SLICK(406): org.newdawn.slick.SlickException: Game.render() failure - check the game code.
09-08 22:40:43.337: ERROR/SLICK(406): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:544)
09-08 22:40:43.337: ERROR/SLICK(406): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
09-08 22:40:43.337: ERROR/SLICK(406): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
09-08 22:40:43.337: ERROR/SLICK(406): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
09-08 22:40:43.337: ERROR/SLICK(406): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
09-08 22:40:43.367: WARN/dalvikvm(406): threadid=9: thread exiting with uncaught exception (group=0x40015560)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): FATAL EXCEPTION: GLThread 10
09-08 22:40:43.367: ERROR/AndroidRuntime(406): java.lang.RuntimeException: org.newdawn.slick.SlickException: Game.render() failure - check the game code.
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:160)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(Unknown Source)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): Caused by: org.newdawn.slick.SlickException: Game.render() failure - check the game code.
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:544)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): at org.newdawn.slick.GDXGameContainer.render(GDXGameContainer.java:156)
09-08 22:40:43.367: ERROR/AndroidRuntime(406): ... 3 more
09-08 22:40:43.427: WARN/ActivityManager(60): Force finishing activity org.newdawn.slick.android/.SlickTestActivity
09-08 22:40:43.649: DEBUG/dalvikvm(60): GC_EXTERNAL_ALLOC freed 95K, 49% free 4274K/8263K, external 3897K/3903K, paused 73ms
09-08 22:40:43.938: WARN/ActivityManager(60): Activity pause timeout for HistoryRecord{4050ac08 org.newdawn.slick.android/.SlickTestActivity}
09-08 22:40:44.188: DEBUG/dalvikvm(60): GC_EXPLICIT freed 11K, 49% free 4274K/8263K, external 3906K/4878K, paused 234ms
09-08 22:40:44.198: INFO/WindowManager(60): Setting rotation to 0, animFlags=1
09-08 22:40:44.228: INFO/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=10}
09-08 22:40:47.088: DEBUG/dalvikvm(60): GC_EXPLICIT freed 12K, 49% free 4274K/8263K, external 3897K/4867K, paused 74ms
09-08 22:40:50.358: DEBUG/dalvikvm(240): GC_EXPLICIT freed 11K, 55% free 2596K/5703K, external 1625K/2137K, paused 50ms
09-08 22:40:54.469: WARN/ActivityManager(60): Activity destroy timeout for HistoryRecord{4050ac08 org.newdawn.slick.android/.SlickTestActivity}
09-08 22:40:55.437: DEBUG/dalvikvm(259): GC_EXPLICIT freed 8K, 54% free 2544K/5511K, external 1625K/2137K, paused 83ms
09-08 22:41:05.128: DEBUG/dalvikvm(311): GC_EXPLICIT freed 4K, 54% free 2538K/5511K, external 1625K/2137K, paused 44ms
09-08 22:41:06.038: INFO/Process(406): Sending signal. PID: 406 SIG: 9
09-08 22:41:06.408: INFO/ActivityManager(60): Process org.newdawn.slick.android (pid 406) has died.
09-08 22:41:06.408: INFO/WindowManager(60): WIN DEATH: Window{40608d00 SurfaceView paused=false}
09-08 22:41:06.428: ERROR/InputDispatcher(60): channel '40767d20 org.newdawn.slick.android/org.newdawn.slick.android.SlickTestActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
09-08 22:41:06.428: ERROR/InputDispatcher(60): channel '40767d20 org.newdawn.slick.android/org.newdawn.slick.android.SlickTestActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
09-08 22:41:06.468: INFO/WindowManager(60): WIN DEATH: Window{40767d20 org.newdawn.slick.android/org.newdawn.slick.android.SlickTestActivity paused=false}

Could anybody please try to test that on his side and tell me if it works?

Edit:
The more I look into it, the more I think that we need to include more of the lwjgl classes into Slick-AE. I actually just tried to add Sys.java into slick/Slick-AE/src/org/lwjgl directory and rebuilt slick-ae.jar and now I get java.lang.NoClassDefFoundError: org.lwjgl.LWJGLUtil.

Thank you very much,
Makenshi


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2011 5:47 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
sorry, I didn't see this post until now. Let me see if I understand: this works on slickAE Desktop when using GDXApplicationGameContainer, but gives an error when you run it on android. You already include gdx-backend-android.jar, gdx.jar, slick-ae.jar, the armeabi folder, and the armeabi-v7a folder in the folder "libs" in the project (note: for some reason the folder MUST be named libs). The test works fine as ling as you don't draw the animation.

It appears that Sys.getTime() is not happening on android, and I suspect that Slick-AE will need to overwrite that call with a different way of getting the time. As long as such a method exists, this should be pretty easy to fix. I may be speaking to soon (I havn't reproduced the bug) but I'll see what I can do to fix it.


Top
 Profile  
 
PostPosted: Wed Feb 15, 2012 7:29 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
Was there a solution to this problem? I've run into the same error:


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)


I have the same set up as Makenshi. The code runs fine on the desktop, but once you try to put it on the Android Emulator/Device it throws this error


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group