终结器抛出的未捕获异常java.lang.IllegalStateException:Binder已经完成

时间:2017-03-24 14:34:37

标签: android soundpool

此代码

soundPool.release();
soundPool = null;

有时会产生此错误:

Uncaught exception thrown by finalizer
java.lang.IllegalStateException: Binder has been finalized!
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(Binder.java:503)
    at com.android.internal.app.IAppOpsService$Stub$Proxy.stopWatchingMode(IAppOpsService.java:431)
    at android.media.SoundPool.release(SoundPool.java:195)
    at android.media.SoundPool.finalize(SoundPool.java:204)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:217)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:200)
    at java.lang.Thread.run(Thread.java:818)

我该怎么办?

1 个答案:

答案 0 :(得分:4)

所以我认为这可能是一个Android错误。看起来很怀疑这个问题,在未来的版本中被标记为已修复":https://issuetracker.google.com/issues/37138597