So I was searching for different ways that could suit me in programming and came across LibGDX. Naturally I looked at the tutorial. As I was doing it, I was following the steps word for word, except naming the classes. In the end, I was able to create the desktop launcher for the game but not the android launcher.

The following error is my error: Cannot instantiate the type Game
(Game is the name of the class)

1 Answer
1

Note: The folder really must be called "libs", a naming convention forced on us by the Android Eclipse plugin.

Without this, your code will still compile within Eclipse, because it is compiling against gdx.jar from the (referenced), desktop project, but won't run on an Android device because gdx.jar wasn't in the libs dir. Although I too have come across (and enjoyed) the tutorials you pointed to, it seems like this point was missed.

I think i know the problem but i dont know how to fix it, the code can be fixed if the name of the file is within the same project. I selected a build path from the Android one to the Desktop one. But it still wouldn't work. What did i do wrong?
–
BlueMar 21 '12 at 14:13