提问人:eburke 提问时间:11/16/2023 最后编辑:eburke 更新时间:11/19/2023 访问量:53
Hiero 无法使用 libGDX 在 IntelliJ 中打开
Hiero not opening in IntelliJ with libGDX
问:
我正在尝试在我的 java libGDX 项目中运行 Hiero,但它无法打开。
我尝试使用桌面模块(desktop 和 desktop.main)运行 Hiero。我还尝试更改了 中的依赖关系。它不会在桌面上运行,但在desktop.main上运行并弹出Hiero加载屏幕,但随后显示了很多错误消息。build.gradle
以下是使用桌面运行时产生的错误:
Error: Could not find or load main class com.badlogic.gdx.tools.hiero.Hiero
Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.tools.hiero.Hiero
Process finished with exit code 1
这是代码:DesktopLauncher.java
package com.mygdx.game;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.mygdx.game.Happy_Warfare;
public class DesktopLauncher {
public static void main (String[] arg) {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setForegroundFPS(60);
config.setTitle("Happy Warfare");
new Lwjgl3Application(new Happy_Warfare(), config);
}
以下是 build.gradle 中的代码:
构建脚本 {
repositories { mavenLocal() mavenCentral() gradlePluginPortal() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } google() } dependencies { classpath 'org.wisepersist:gwt-gradle-plugin:1.1.16' classpath 'org.gretty:gretty:3.0.7' } }
所有项目 { 应用插件:“eclipse”
version = '1.0' ext { appName = "Happy Warfare" gdxVersion = '1.12.0' roboVMVersion = '2.3.19' box2DLightsVersion = '1.5' ashleyVersion = '1.7.4' aiVersion = '1.8.2' gdxControllersVersion = '2.2.1' } repositories { mavenLocal() mavenCentral() google() gradlePluginPortal() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } maven { url "https://jitpack.io" } } }
项目(“:d esktop”) { 应用插件:“java-library”
dependencies { implementation project(":core") api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion" api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" } }
项目(“:html”) { 应用插件:“java-library” 应用插件: “GWT” 应用插件:“war” 应用插件:“org.gretty”
dependencies { implementation project(":core") api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" api "com.badlogicgames.gdx:gdx:$gdxVersion:sources" api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources" api "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources" } }
项目(“:核心”) { 应用插件:“java-library”
dependencies { api "com.badlogicgames.gdx:gdx:$gdxVersion" api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" api "com.badlogicgames.gdx:gdx-tools:$gdxVersion" // https://mvnrepository.com/artifact/com.badlogicgames.gdx/gdx-tools // implementation group: 'com.badlogicgames.gdx', name: 'gdx-tools', version: '1.12.1' } }
Any help would be appreciated.
答: 暂无答案
评论