音乐视频放在raw下 播放音乐的函数 private void playmusic() { mediaPlayer=MediaPlayer.create(this,R.raw.game_music); mediaPlayer.setLooping(true); mediaPlayer.start(); } 变量定义: MediaPlayer mediaPlayer;