LibGDX项目找不到资产文件夹

编程入门 行业动态 更新时间:2024-10-28 02:28:21
本文介绍了LibGDX项目找不到资产文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我突然遇到了构建环境的问题,我无法弄清楚原因。我可以使用gradlew桌面运行我的项目:运行然而,当我尝试使用右键单击运行作为桌面应用程序从Eclipse运行项目时(当然在桌面项目上)它突然找不到我的pack.atlas文件。毫无疑问文件存在。我多次刷新了我的eclipse项目,使用gradle命令行运行项目很好。昨天工作正常。我唯一能想到的就是它让我搞砸了昨天我在IDE中运行了一个Gradle命令但是我不确定它怎么会像这样搞砸了。由于我不能将Eclipse调试器与此错误一起使用,因此我必须弄清楚这个问题。有没有人猜到为什么Eclipse没有看到资产文件夹?

I have suddenly run into an issue with my build environment and I can't figure out why. I can run my project just fine using gradlew desktop:run however, when I try to run the project from Eclipse using right-click run as desktop application (on the desktop project of course) it suddenly cannot find my pack.atlas file. There is no doubt the file exsts. I have refreshed my eclipse project multiple times and the project runs fine using gradle commandline. It was working fine yesterday. The only thing I can think of that made it mess up was I ran a Gradle command from within the IDE yesterday but I'm not sure how it could have got messed up like this. It is important for me to figure out this issue as I cannot use the Eclipse debugger with this error. Does anyone have any guess as to why Eclipse isn't seeing the assets folder?

推荐答案

可能你的android项目的资产是没有正确链接到桌面项目。

Probably your assets from the android project is not correctly linked with the desktop project.

桌面项目内的链接资源文件夹应如下所示:

Your linked assets folder from inside the desktop project should look like this:

如果不存在(或者不存在),删除文件夹(在桌面项目中),然后转到项目属性 - > java构建路径 - > 源 - > 链接源

If it doesn't(or it doesn't exists) ,delete the folder(in the desktop project),and go to the the project properties->java build path->source->link source

浏览 - > [选择android项目中的资产文件夹] - > 完成

browse->[select the asset folder inside the android project]->finish

更多推荐

LibGDX项目找不到资产文件夹

本文发布于:2023-11-13 10:08:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584096.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   文件夹   资产   项目   LibGDX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!