当我使用MediaPlayer播放mp3文件时,系统会报错log: Prepare failed: status=0xFFFFFF8E
. 但是Realplayer是正常的。
我发现它只有在更高的ROM版本中才会出现错误。就像在 version4.0 中一样,它有错误。在 version2.3 中它没有错误。
编码:
private MediaPlayer mpBack = null;
/**
* read in background sound from the resource file
* @param resId
*/
public void MediaPlay(int resId){
if(!isPlaying()){
mpBack = MediaPlayer.create(ctMedia, resId);
/**Volume Set */
mpBack.setVolume(0.8f, 0.8f);
/**Background music default infinite loop*/
mpBack.setLooping(true);
mpBack.start();
}
}
LogCat 错误:</p>
12-18 21:51:57.380: E/MediaPlayer(31457): mOnVideoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message.
12-18 21:51:57.380: E/MediaPlayer(31457): mOnPreparedListener is null. Failed to send MEDIA_PREPARED message.