2010-11-15 69 views
1

我正在創建媒體播放器。它的歌曲顯示在listview,但是當我點擊歌曲時。日誌貓顯示這個錯誤:mediaplayer不能正常工作

mp.reset(); 
mp.setDataSource(songPath); 
mp.prepare(); 
mp.start(); 

logcat的錯誤:

11-15 19:12:32.250: INFO/StagefrightPlayer(34): setDataSource('/sdcardparatha.mp3') 
11-15 19:12:32.289: ERROR/MediaPlayer(2515): error (1, -2147483648) 
11-15 19:12:32.289: VERBOSE/song(2515): Prepare failed.: status=0x1 

回答

1

當然那不是去工作,因爲你設置你的資源是/sdcardparatha.mp3,而你的意思/sdcard/paratha.mp3