Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to terminate app in Android Studio-- app running on separate device

Tags:

android

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:

http://i.imgur.com/wIuGhd9.png

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.

like image 576
felwithe Avatar asked Feb 06 '15 15:02

felwithe


People also ask

How do I terminate an Android app?

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.

How do I completely close a programmatically app in Android?

use 'System. exit(0);' when you really want to exit the app.

How do I stop apps from running in my Android library?

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.

What is terminating a app?

Terminating an app simply forces the app to start it's lifecycle again and can resolve some issues you may have.


1 Answers

You need to select the process com.mycompany.myfirstapp and then press the Terminate Application button.

like image 144
Sebastiano Avatar answered Sep 19 '22 05:09

Sebastiano