简体   繁体   English

Gdx.audio错误

[英]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.

相关问题 使用GDX NET API的JVM绑定错误 - JVM BIND ERROR using GDX NET api GDX Pay Desktop没有类定义错误 - Gdx pay desktop no class defined error 错误:包 com.badlogic.gdx.backends.lwjgl 不存在 - error: package com.badlogic.gdx.backends.lwjgl does not exist Java + Libgdx:Gdx.app.log()空指针错误 - Java + Libgdx: Gdx.app.log() null pointer error libGDX GWT编译错误似乎与com.badlogic.gdx.utils.AtomicQueue有关<T> - libGDX GWT compile error that appears to be related to com.badlogic.gdx.utils.AtomicQueue<T> 库GDX html运行时,System Java Compiler(Eclipse)出现错误(Windows 7) - Lib GDX html running gives an error with System Java Compiler (Eclipse) (Windows 7) “错误:(3,24)java:包com.badlogic.gdx不存在”,如何解决此问题? - “Error:(3, 24) java: package com.badlogic.gdx does not exist”, How to fix this? com.badlogic.gdx.utils.GdxRuntimeException:无法加载文件:-错误 - com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: - Error 为什么在关闭 GDX 游戏窗口后会出现错误? - Why do I get an error after closing my GDX game window? LIBGDX Getting this error com.badlogic.gdx.utils.SerializationException: Error reading file: ui/uiskin.json ON ANDROID ONLY - LIBGDX Getting this error com.badlogic.gdx.utils.SerializationException: Error reading file: ui/uiskin.json ON ANDROID ONLY
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM