LibGDX project can#39;t find assets folder(LibGDX 项目找不到资产文件夹)
问题描述
我的构建环境突然遇到问题,我不知道为什么.我可以使用 gradlew desktop:run 很好地运行我的项目,但是,当我尝试使用右键单击作为桌面应用程序运行(当然在桌面项目上)从 Eclipse 运行项目时,它突然找不到我的 pack.atlas 文件.毫无疑问,该文件存在.我已经多次刷新了我的 Eclipse 项目,并且该项目使用 gradle 命令行运行良好.昨天工作正常.我能想到的唯一一件事就是昨天我从 IDE 中运行了一个 Gradle 命令,但我不确定它怎么会像这样搞砸.弄清楚这个问题对我来说很重要,因为我不能使用 Eclipse 调试器来处理这个错误.有没有人猜到为什么 Eclipse 没有看到 assets 文件夹?
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项目内的asset文件夹]->完成
这篇关于LibGDX 项目找不到资产文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:LibGDX 项目找不到资产文件夹
基础教程推荐
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01