my app crashes every time I click on button1. Another button in the same activity works fine. I already tried replacing the button and the code. There is no Error in the console.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_start); Button button1 = (Button) findViewById(R.id.button1) button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(PreLogin.this, Fach.class); startActivity(intent); } });