Android 媒体播放器错误 (-2,0)

标签 android android-mediaplayer

有人熟悉 Android MediaPlayer 的此错误吗?

MediaPlayer: Error (-2,0)

没有记录。

最佳答案

它可能来自 OpenCore,MediaPlayer 是 OpenCore 的高级抽象。 “-2”表示某些操作被取消。

这里是list of error codes .

/*
 Error due to cancellation
 */
const PVMFStatus PVMFErrCancelled = (-2);

这是doc with the detailed code description .

3.8. PVMFErrCancelled This error code is returned when some old request is cancelled. In that sense this error is actually an expected value and should not be treated as a fatal error.

因此,您可能会忽略它,或者仔细检查您如何实现工作流程以及它是否符合预期(您可以在 MediaPlayer 类的引用中找到它)。

关于Android 媒体播放器错误 (-2,0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35769633/

相关文章:

android 中的 java.util.ConcurrentModificationException(GLThread 23204)

video-streaming - android 中的 HLS 自适应流仅在 10 秒后更改流?

android - 在Samsung Galaxy S4 Mini上播放mp3流时,MediaPlayer错误(100,0)

angular - 使用ionic 4 cordova仅从设备存储中获取音频文件

android - Appcelerator Titanium 许可证

android - 在 Android 中使用 .amp 扩展名访问 mpeg-4 编码的 RTSP 直播流(Axis 服务器)

android - Backstack android fragment 导航

android - 音频播放完毕后通知

android - 在Android上处理音频文件

android - 自定义样式的 AlertDialog 的样式属性