libgdx:声明的程序包与预期的程序包“"不匹配. [英] libgdx: The declared package does not match the expected package ""
问题描述
我正在使用LibGdx和Eclipse,我使用了最新版本和设置工具,该工具为Android,桌面和另一个名为"core"的项目创建了项目,我在Eclipse中导入了该项目,但是在这两个版本中,我始终遇到此错误桌面和Android项目:
I'm working with LibGdx and Eclipse, I used the latest version and the setup tool that creates the project for Android, desktop and another one named "core", I imported in Eclipse, but I keep getting this error in both desktop and android projects:
已声明的软件包"com.mygdx"与预期的软件包"不匹配
The declared package "com.mygdx" does not match the expected package ""
能帮我一下吗?在此先谢谢您!
Could you help me out please? Thanks in advanced!
推荐答案
右键单击src文件夹,然后选择构建路径"->用作源文件夹".然后重新启动Eclipse.
Right click on the src folder and select Build Path -> Use as Source Folder. Then restart Eclipse.
右键单击项目->属性-> Java构建路径->源->添加文件夹->选择src/
right click project -> Properties -> java Build Path -> Source -> Add Folder -> select src/
基本上,eclipse无法正确地降低您的包树.刷新项目后,尝试进行干净的构建.
Basically eclipse is not able to descend your package tree correctly. After this refresh the project try a clean build.
这篇关于libgdx:声明的程序包与预期的程序包“"不匹配.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!