[英]Gdx.audio error
So i'm doing the simple game thing in the libgdx wiki and i have finished them and i get these error. 因此,我正在libgdx Wiki中进行简单的游戏操作,并且完成了这些操作,但出现了这些错误。
First is this : 首先是:
dropSound = new Gdx.audio.newSound(Gdx.files.internal("drop.wav"));
rainMusic = new Gdx.audio.newMusic(Gdx.files.internal("rain.mp3"));
i get the error in Gdx.audio 我在Gdx.audio中收到错误
And the second is this 第二个是
Iterator<Rectangle> iter = raindrops.iterator();
the error is in Iterator 错误在迭代器中
That's what i see in the console 这就是我在控制台中看到的
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.Error: Unresolved compilation problems:
Gdx.audio cannot be resolved to a type
Gdx.audio cannot be resolved to a type
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: java.lang.Error: Unresolved compilation problems:
Gdx.audio cannot be resolved to a type
Gdx.audio cannot be resolved to a type
at com.JohnAilamakis.Drop.Drop.create(Drop.java:55)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Please if you can tell me whhat's the problem. 请您告诉我问题出在哪里。
To resolve this error, reference gdx.jar in the project where ApplicationListener cannot be resolved. 要解决此错误,请在无法解析ApplicationListener的项目中引用gdx.jar。 Sometimes it's also a problem with Eclipse and deleting and re-importing the project can help to solve the error.
有时Eclipse也是一个问题,删除并重新导入项目可以帮助解决错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.