Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I finished tweaking a tutorial called Rain Catcher and I ran the desktop application. It works fine. I then proceeded to run the application using the android emulator the game then crashes.

I set up the project using libGDX's project set-up.

Why won't it run properly on the android emulator even though it runs fine on the desktop application?

enter image description here

I don't know if you can see it but if you zoom you would be able to see it easier.

share|improve this question
up vote 5 down vote accepted

If the Android project compiles correctly but is missing classes when run, it may be because ADK r17 (the current version atm) doesn't include the external game project as part of the build. There's an extra step you have to do that's still lacking from most of the existing documentation for project setup. It's described here. Copying from that site, the steps are:

  1. Click on your Android Project
  2. Select Properties
  3. Select Java Build Path
  4. Select Order and Export
  5. Check all your references, e.g. the gdx.jar, the gdx-backend-android.jar, your main code project etc.

The pictures on the site are helpful, so go check that out.

share|improve this answer

It's unable to resolve the superclass for Lcom/badlogic/drop/Drop and unable to resolve Lcom/badlogic/gdx/backends/android/AndroidApplication

So I'd say there's an issue with the badlogic library. You may want to read the text files it wrote out to see their stack traces. Perhaps that'll give you more of a clue.

Did you look at the "Running the game on Android" section of the documentation you linked? Are you sure the AndroidApplication backend is present?

You really need to start investigating these types of errors on your own BluFire.

share|improve this answer
The thing is that most errors come from other errors. So I don't know the root of the problem, all i know is that my application wont work and that there are a lot of errors. – Blue Apr 18 '12 at 18:20
I know, it takes time to get comfortable with it. It's just that with these types of problems, you're the best person to solve these. You're hands on, and can more easily trace things back to a common issue. Compare your version to a non-tweaked version. What kind of differences are there? Problems like this are typically not in the code, they're in the project setup. Check out those settings first. – Byte56 Apr 18 '12 at 18:30
Also, you should post the errors as text, that way, when people search for this issue in the future, they're more likely to find it. – Byte56 Apr 18 '12 at 18:31
Well that's good, if it worked before you changed things then you know where the problem is. It's in the code you changed. That's the first place you should look. Whenever you're changing code, you should make the changes as incremental as possible and build in-between to ensure you haven't broken anything. I know you don't know the root of the problem. That's where in investigation part comes in. People here don't just automatically know what the root issue is, they look at the logs and trace the problem back to its source. – Byte56 Apr 18 '12 at 18:57
Because the project set up is different for each. Read the document you posted. – Byte56 Apr 18 '12 at 19:13

Generally, this problem (missing GDX libraries at run-time on Android) is because the "libs" directory isn't setup exactly as specified in the project doc. The directory must be called "libs" and it must contain the GDX backend and both sets of ARM libraries.

share|improve this answer

The behavior is odd because since you don't get a compile error on, it appears that you have your project set up properly. For the Dalvik DexClassLoader to fail, it appears that something is getting messed up in the build process. If you really want to investigate, take the .apk and run it through dex2jar and open it with a Java Decomplier and see if there are classes missing.

If the classes are there, it would suggest to me that you have problems with your development environment. Either Java/JVM, your Android SDK or the build of libgdx you have is corrupt. Since it works in the Java Project like you said, one would think that maybe trying to reinstall the Android SDK may resolve your issues.

share|improve this answer

Had the same problem, realized i did not have the "Use host GPU" box checked on the emulator.

share|improve this answer
Hey Yocko, please mind that this page is for providing answers to questions. Posts like 'I did this the same' are generally not ment for answers. If you want to post something like this, consider making it a comment – floAr Nov 14 '13 at 6:53
Considering the emulator works, it's probably not an issue with the emulator settings. – Byte56 Nov 14 '13 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.