-11

I think some new update made it so when I close Android Studio, it first stops the app that is running on my phone. I would like this not to happen.

Is there a setting somewhere to make it not do this?

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • Don't run it from Android Studio. It has nothing to do with an update. If you start it from an IDE, and the IDE closes, the app also closes. – Ken White Dec 11 '22 at 07:13
  • @KenWhite It has to be an update, seeing as this didn't happen before. If I run my app from Android Studio, and it has notifications and/or background processes, and I close Android Studio, it stops those and gets rid of the notification. – David Gates Dec 12 '22 at 05:15
  • @KenWhite okay, better question: what is a better way to run the app from? – David Gates Dec 20 '22 at 06:29
  • The main point of this is that my app uses PendingIntent alarms and notifications and such. If Android Studio Force Stops my app, then all those go away and I have to restart them manually. – David Gates Dec 25 '22 at 07:27
  • 2
    It is not acceptable here to add SOLVED to your post or to edit a solution into the question. If you've found a solution and want to share it, do so by writing an answer in the space below that was provided for that purpose. See [Can I answer my own question?](http://stackoverflow.com/help/self-answer) for details. If you no longer want the question here, you can delete it using the link below the tags in the lower left corner of your post. – Ken White Dec 25 '22 at 15:00
  • 2
    I feel like something is missing in the question & comment. When you're running an app from Android Studio, it will also install the app on the device first. Is there any reason why you can't just run the app from the device directly? – Andrew T. Dec 29 '22 at 07:13
  • 5
    Does this answer your question? [How to stop debug without closing app in Android Studio 2](https://stackoverflow.com/questions/36647707/how-to-stop-debug-without-closing-app-in-android-studio-2) – Cody Gray - on strike Dec 29 '22 at 07:20

1 Answers1

3

For anyone else who's wondering, I figured it out. You simply have to disconnect the phone from your device first.

For example, if it's plugged into your PC for USB Debugging, simply unplug your phone before closing Android Studio.

Or if you're using Wireless Debugging, disconnect from your phone (or simply turn off Wireless Debugging) before closing Android Studio.