我需要在随机按钮上执行 performClick() 方法。获取 NullPointerException
final Button[] buttons = {bt1, bt2, bt3, bt4, bt5, bt6, bt7, bt8, bt9};
bt1.setOnClickListener(new View.OnClickListener() {
public void onClick(View p1)
{
// TODO: Implement this method
int rando = (int) (Math.random()*9);
Button randombutton = (buttons[rando]);
randombutton.performClick();
}
});