player = new MediaPlayer();
player.create(MainActivity.this, R.raw.deng);
player.start();
报start called in state 1 是什么问题?? 谢谢
------解决思路----------------------
public static MediaPlayer create(Context context, int musicID) {
if (mediaPlayer != null) {
mediaPlayer.stop();
mediaPlayer.release();
}
mediaPlayer = MediaPlayer.create(context, musicID);
try {
mediaPlayer.prepare();
} catch (IOException e) {
e.printStackTrace();
}
return mediaPlayer;
}
试试这样的创建?猜测是没有prepare就立刻start了
called in state XX 一般是步骤错了
------解决思路----------------------
建议看下构造函数
------解决思路----------------------