To stop a running emulator, click Menu and select Stop.
The Android Emulator runs directly inside Android Studio by default. This allows you to conserve screen real estate, navigate quickly between the emulator and the editor window using hotkeys, and organize your IDE and emulator workflow in a single application window.
Apart from memory management, there are also several reasons to falls keep stopping Android Studio. Such as working on wrong coding or having some exceptions in the programs. Besides, this app can crash if you're working with full cache memory, old updates, and insufficient RAM.
Following worked for me on Android Studio 3.x.
Step 1: Open AVD Manager.
Step 2: Right click and Wipe data for the virtual device you're testing on.
I too had the same problem, then I went to AVD manager and right click on the emulator and stopped it and I RUN the application again and this time it worked. It may be a temporary solution but works for the time being.
Tools -> AVD manager -> right-click on the emulator you are using -> Stop
Now Run
your application again.
Note: Sometimes closing the emulator directly is not working for the above-mentioned problem but stopping it from the AVD manager as mentioned is working.
In case you are on Mac, ensure that you exit Docker for Mac. This worked for me.
Three days on this, and I believe there's a race condition between adb and the emulator. On a request to run an app, with no emulator already running, you see the "Initializing ADB", then the emulator choice, it starts and you get "Waiting for target to come online". An adb kill-server, or a kill -9, or an "End Process" of adb with the task manager will cause adb to die, restart, your APK installs and you're good to go. It does seem funky to me that an "adb kill-server" causes adb to die and then restart here, but that's another mystery, maybe.
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