Change to
final Button button = (Button) findViewById(R.id.button_main);
You have
<Button
android:id="@+id/button_main" // id is button_main not activity_button
Probably activity_button
id belongs to another view and you are casting it to a Button
.