3

在 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)

提前致谢。

4

1 回答 1

-1
   {final FileInputStream i = openFileInput("local file name with no /s");
    player.setDataSource(i.getFD());
    i.close();
   } 
于 2013-11-05T09:43:12.363 回答