I\'m having a problem with emulator-5554, it keeps telling me it is offline.
When I do a adb devices
from the command line it says
From the AVD Manager try the "Cold Boot Now" option in the drop-down. It worked for me!
In my case, I found some process that makes adb not work well.
You can try to kill some strange process and run "adb devices" to test.
It worked for me:
kill the process name MONyog.exe
If the emulator is already open or executing it will tell you is offline. You can double check on the Command Line (Ubuntu) and execute:
adb devices
You must see your emulator offline, you have to close the running instance of the emulator (since the port will show as busy) and after that you can run your application. Hope this helps someone.
The way that Android detects emulators is by scanning ports starting at port 5555.
The number you see in the adb devices
list (in your case 5554) will be one less than the port that adb is finding open.
You probably have a process running that is listening on port 5555. To get rid of the "offline" device, you will need to find that application and close it or reconfigure it to listen to a different port.
In my case the cause was that I had resumed a VM with android-x86 inside. Rebooting the VM with Android-x86 and restarting the adb server fixed the problem.
open your emulator,
setting --> about emulated device --> click Build number repeatedly-->open developer options --> open USB debuggin