How to terminate app in Android Studio— app running on separate device
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.
5 Solutions collect form web for “How to terminate app in Android Studio— app running on separate device”
You need to select the process
com.mycompany.myfirstapp and then press the Terminate Application button.
As above mentioned,we can terminates the apps which are running in an emulator or real device using Android Device Monitor.These are the steps to follow.
To open the Android Device Monitor,click the android logo(24th icon from left).when you take the cursor on the icon it will display as “Android Device Monitor”.
You will get a screen like this.In here in device part it shows the emulators or connected android device to the computer.
Select the device.Then it will shows the current apps running in the device.
Select the app which you want to terminate and click the stop icon above.This will terminates your app.
You can find the process list and terminate your running app by opening the Android Device Monitor, located here:
That just happened to me.
The solution is to press on the “Debug app” button ( the bug next to the green triangle). A window will pop up that says that it will stop the Emulator. It wont, but Now you will be able to press terminate button.
Select the process which you want to terminate, and click on Terminate Application.