Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7199

Android App Crashes when Button is clicked, startActivity

$
0
0

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);            }        });

Viewing all articles
Browse latest Browse all 7199

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>