错误消息:“GwtApplication:异常:无法加载图像'a.jpg',文件不存在”
电话是:
Texture texture;
texture =new Texture(Gdx.files.internal("a.jpg"));
该应用程序在作为桌面应用程序运行时正常运行。该文件存在于 core/assets 文件夹和 war/assets 文件夹中。我正在使用 IntelliJ IDE。任何帮助将非常感激!
更新: 当我作为普通桌面应用程序 (gradlew desktop:run) 编译和运行时,它按预期运行。但是当我以 HTML5 (gradlew.bat html:superDev) 运行时,它找不到图像并且 Gwt 抛出异常。这似乎是一个 Gwt 运行时错误。
实际输出: