Accepted answer

The error you are seeing is related to the Android SDK configuration, and is not specific to libGDX. The compiler does not know which Android libraries to compile against.

Use the LibGDX tutorials to setup your projects correctly. (See The first step in there does the Android-specific setup.)

If you do not want to create a new project but fix an existing project, the following steps should configure a project to build against Android:

  1. right-click on the project in the Eclipse Package Explorer
  2. select Properties and pick the Android section
  3. Make sure exactly one of the "Project Build Targets" is selected.

That should add the required Android libraries to the build path as a side-effect.


Please, also check to have ADT installed on Eclipse.

Related Query

More Query from same tag