android.os.Bundle cannot be resolved in libgdx Android project

后端 未结 2 987
执念已碎
执念已碎 2021-01-01 09:33

I\'ve just started using Libgdx to practice making games and I used the project creation .jar provided on the site to create the initial projects. However an error shows up

相关标签:
2条回答
  • 2021-01-01 09:54

    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 https://github.com/libgdx/libgdx/wiki/Manual-project-setup#android-project-setup. 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.

    0 讨论(0)
  • 2021-01-01 10:17

    Please, also check to have ADT installed on Eclipse.

    0 讨论(0)
提交回复
热议问题