Android MediaPlayer throwing “Prepare failed.: status=0x1” on 2.1, works on 2.2

后端 未结 15 1035
独厮守ぢ
独厮守ぢ 2020-11-27 17:17

I\'ve been really banging my head against the table trying to get the MediaPlayer class to try to play h.264-encoded videos on Android 2.1. My code is rather simple:

<
15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 18:18

    I do not know if this is your issue, but I just found a solution to the problem the described by Tuszy above. I could read the file I was creating from external storage but not from Cache.

    The solution is that the read write permissions when writing the file are different.

    Please see this excellent explanation in this blog I found.

    http://blog.weston-fl.com/android-mediaplayer-prepare-throws-status0x1-error1-2147483648/

提交回复
热议问题