播放时出现安卓媒体播放器错误:E / MediaPlayer(4768):错误(1,-2147483648)

时间:2013-02-21 05:53:11

标签: android android-mediaplayer

在Android 4.0中播放声音时出错,但此代码适用于2.3.3

                        mp = new MediaPlayer();
            mp.setDataSource(recordedSoundFilePath);
            mp.prepare();
            mp.start();

错误日志

02-21 05:42:44.542: E/MediaPlayer(4768): error (1, -2147483648)
02-21 05:42:44.550: E/MediaPlayer(4768): Error (1,-2147483648)
02-21 05:42:44.550: D/MediaPlayer(4768): Info (1,-2147483648)

提前致谢。

1 个答案:

答案 0 :(得分:0)

   {final FileInputStream i = openFileInput("local file name with no /s");
    player.setDataSource(i.getFD());
    i.close();
   }