ImageButton imageButton1;
imageButton1 =(ImageButton) findViewById(R.id.imageButton1);
不要写成
Button imageButton1;
imageButton1 =(Button) findViewById(R.id.imageButton1);
找了一晚上错误
ImageButton imageButton1;
imageButton1 =(ImageButton) findViewById(R.id.imageButton1);