问题描述
嘿,我现在正在为台式机和Android开发2D游戏.我安装libGDX是因为我听说它使使用Java开发游戏更加容易.但是当我运行桌面代码时,它会显示此错误java: cannot access com.badlogic.gdx.ApplicationListener class file for com.badlogic.gdx.ApplicationListener not found
这是我正在运行的主要代码:
Hey right now i'm making a 2D game, for the desktop and Android. I installed libGDX because i heard that it made developing a game in java easier. But when i run the desktop code it shows up with this errorjava: cannot access com.badlogic.gdx.ApplicationListener class file for com.badlogic.gdx.ApplicationListener not found
This is the Main code that i'm running:
package com.rare.Forms;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
public class Main {
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "MyGame";
cfg.useGL20 = false;
cfg.width = 480;
cfg.height = 320;
new LwjglApplication(new MyGame(), cfg);
}
}
我已尝试多次安装该库,但始终显示相同的错误.如果有人可以帮助我,我将非常高兴.哦,抱歉英语不好,这不是我的出生语言.
I've tried installing the library, multiple times but it always shows the same error.I would be very greatfull you someone could help me.Ohh and sorry for the bad english, it isn't my birth language.
推荐答案
这篇关于找不到libGDX ApplicationListener的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!