需要加prepare()吗还是怎样?
我这样写不行啊。。
final MediaPlayer mp = MediaPlayer.create(getApplicationContext(), R.raw.cs);
bt1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
try {
mp.prepare();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
mp.start();
}
});