The app runs great, but there doesn't seem to be a way to terminate it. There is a "Terminate Application" button, but it's greyed out, as seen here:
I've tried pressing the Home and the Back buttons on the device many times, to no effect.
The app is from the second lesson in the Android Studio tutorials, so it's the bare minimum amount of code (it's one lesson after Hello World). Is the problem that there's no onClose() event, so it just keeps running?
Edit: I should add that I think it's still running because messages are still coming through the debugger. Although, it's just occurred to me-- is the debugger simply listening to the device, and those messages aren't coming from my program, but are just background messages from the device?
Edit2: Solved thanks to dexter. You need to select the process name (com.mycompany.myfirstapp) before the terminate button will become active.
Close one app: Swipe up from the bottom, hold, then let go. Swipe up on the app. Close all apps: Swipe up from the bottom, hold, then let go. Swipe from left to right.
use 'System. exit(0);' when you really want to exit the app.
If you want app to be stopped immediately then you have to press the Red stop button. Play button will stop the app only after gradle build is finished.
Terminating an app simply forces the app to start it's lifecycle again and can resolve some issues you may have.
You need to select the process com.mycompany.myfirstapp
and then press the Terminate Application button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With