I've created a couple of AVD-s in Android Studio. They were launching on emulator port 5554. Then I've created another AVD via android avd
application, and they are starting on port 5556.
Now with a single emulator running, I get the following output from adb devices -l
:
List of devices attached
emulator-5556 device
emulator-5554 offline
I'm using the tooling which cannot supply the -s
(specific device) option to adb
, so when trying to install an app, I get an error:
error: more than one device/emulator
And I'd like that there be a single connected emulator: the only one that I'm running.
I thought that removing the old Android Studio-created devices would do the trick of removing the emulator-5554, but nope. Even new devices created in Studio will open on 5556. So I've ended up with a forever-offline zombie emulator-5554
that screws up my build tooling.
How can I force the new emulators to be run on port 5554 and/or remove the offline emulator-5554
?
(Running Ubuntu 16.04 if it matters.)
Deleting an emulator In Android Studio, open the AVD Manager from “Tools” → “AVD Manager”, where you'd normally launch an emulator. In the “Actions” column, click the arrow pointing down to open the menu for the emulator you want to delete. Select “Delete” and confirm in the dialog.
1. just click on "About the emulator" -> "Build Number" about 5-7 times. 2. This will open "developers options", go back and click on it and enable "USB debugging" to bring it online.
When I am facing the same issues than doing like below:
adb kill-server
followed by adb start-server
in a command prompt99% of my issues have been resolved with these steps.
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