Random random1=new Random();int r1=random1.nextInt(6);TextView tv1=(TextView)findViewById(R.id.textview1);tv1.setText(r1);
AVD上运行后停止工作
工程SDK version 24
tv1.setText(r1+“”);这样试一下
是自己粗心 已经解决了setText() 要用String型tv1.setText(String.ValueOf(r1));