Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libgdx: android application cannot find the main game class

Tags:

android

libgdx

I have created the three projects as described in http://code.google.com/p/libgdx/wiki/ProjectSetup, and running the desktop version works, but I am getting the error below when I run the android version on the emulator. The main project is in the build path of the android project and eclipse builds everything with no errors. what am I missing?

10-31 07:06:47.023: E/dalvikvm(769): Could not find class 'com.mygame.MyGame',
referenced from method com.mygame.MyGameAndroid.onCreate
like image 278
akonsu Avatar asked Feb 23 '23 13:02

akonsu


1 Answers

I have resolved this when I switched the Java compiler for the main project from JavaSE-1.7 to JavaSE-1.6. Do now know why this did not work with JavaSE-1.7. Would appreciate any comments on that.

EDIT: a related post: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=2314

like image 143
akonsu Avatar answered Mar 04 '23 19:03

akonsu