有谁知道为什么我的振动服务在我单击时出现错误Buttons
?它说"....... force close"
。这是我的代码:
final Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
public void onClick(View v) {
Intent newgameIntent = new Intent(BodyPartsGameActivity.this,gamelevel.class);
startActivity(newgameIntent);
mp.start();
mVibrator.vibrate(500);
}