简体   繁体   中英

mediaplayer not working

I am create media player. Its display songs in listview but when I click the song. The log cat show this error:

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

logcat error:

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

当然那是行不通的,因为您将资源设置为/sdcardparatha.mp3而您的意思是/sdcard/paratha.mp3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM