title: How to terminate app in Android Studio-- app running on separate device
body: <p>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:</p>
  
  <p><img src="https://i.stack.imgur.com/PfivB.png" alt="http://i.imgur.com/wIuGhd9.png"></p>
  
  <p>I've tried pressing the Home and the Back buttons on the device many times, to no effect.</p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>Edit2: <strong>Solved</strong> thanks to dexter. You need to select the process name (com.mycompany.myfirstapp) before the terminate button will become active.</p>