简体   繁体   English

LibGdx - 安装Android项目

[英]LibGdx - Installation Android project

I imported into Eclipse LibGdx but I have a problem with the version on android. 我导入Eclipse LibGdx但是我的android版本有问题。 Everything went well, creating a project and importing LibGdx to Ecipse. 一切顺利,创建项目并将LibGdx导入Ecipse。 I have two errors: 我有两个错误:

Description Resource Path Location Type The project was not built since its build path is incomplete. 说明资源路径位置类型项目未构建,因为其构建路径不完整。 Cannot find the class file for android.os.Handler. 找不到android.os.Handler的类文件。 Fix the build path then try building this project test-android Unknown Java Problem 修复构建路径然后尝试构建此项目test-android Unknown Java Problem

and: 和:

Description Resource Path Location Type The type android.os.Handler cannot be resolved. 说明资源路径位置类型无法解析android.os.Handler类型。 It is indirectly referenced from required .class files AndroidLauncher.java /test-android/src/com/mygdx/test/android line 1 Java Problem 它是间接引用所需的.class文件AndroidLauncher.java / test-android / src / com / mygdx / test / android line 1 Java问题

I format the disk, thinking that this will solve the problem but I still have the same errors. 我格式化磁盘,认为这将解决问题,但我仍然有相同的错误。

I fixed it installing Eclipse ADT Plugin. 我修复了它安装Eclipse ADT插件。

At Eclipse - Help -> Install New Software 在Eclipse - 帮助 - >安装新软件

  • In "Work with" whrite: https://dl-ssl.google.com/android/eclipse/ 在“使用”中使用以下内容: https ://dl-ssl.google.com/android/eclipse/

  • Add

  • Select All 全选

  • Finish

  • Agree 同意

  • Reload Eclipse 重新加载Eclipse

  • Project -> Properties -> Android -> Choose at Project build target 项目 - >属性 - > Android - >选择项目构建目标

  • Then click OK 然后单击确定

  • Refresh android project 刷新android项目

Wait a sec and error should be gone. 等一下,错误就应该消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM