SoundManager 报告错误
在我的应用程序报告中强制关闭:
java.lang.ClassCastException: int[] 无法转换为 java.lang.ref.WeakReference 在 android.media.SoundPool.postEventFromNative(SoundPool.java:466) 在dalvik.system.NativeStart.run(本机方法)
Soundpool 由我创建的 Soundmanager 类包装,该类静态使用,即:
SoundManager.getInstance();
SoundManager.initSounds(this, mApp.Sound(), mApp.Voice());
SoundManager.loadSounds();
...
SoundManager.playSound(SoundManager.SNDGAMEOVER, 1);
...
我的主要活动和另一个活动之间发生错误 - 不确定是否是当第二个活动的一个实例正在关闭或正在打开时。由于它是间歇性的,因此很难调试。还有其他人遇到过类似的问题吗?
Got a force close in my app reporting:
java.lang.ClassCastException: int[] cannot be cast to java.lang.ref.WeakReference
at android.media.SoundPool.postEventFromNative(SoundPool.java:466)
at dalvik.system.NativeStart.run(Native Method)
Soundpool is wrapped by a Soundmanager class I created which is used statically, i.e.:
SoundManager.getInstance();
SoundManager.initSounds(this, mApp.Sound(), mApp.Voice());
SoundManager.loadSounds();
...
SoundManager.playSound(SoundManager.SNDGAMEOVER, 1);
...
The error occurred between my main activity and another activity - not sure if it was while one instance of the second activity was closing or was opening. Its difficult to debug because its intermittent. Has anyone else run in to similar problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论