Skip to content Skip to sidebar Skip to footer

Android Studio App Keeps Closing

okay so i am new to android studios, and i was messing around with a stupid fart noise app. My first attempt was a single button that played a noise now i have three buttons but th

Solution 1:

The way you initialize the button is wrong. This is the correct way to initialize the view:

button1 = (Button)findViewById(R.id.button1);
button2 = (Button)findViewById(R.id.button2);
button3 = (Button)findViewById(R.id.button3);

Post a Comment for "Android Studio App Keeps Closing"