I am relatively new to android studio, and ever since I started using it I have encountered a recurring problem, and at this point it is preventing me from making any progress in learning how to use this IDE.
This question is relevant to android studio Hedgehog
The problem relates to the AVD/emulator. I am getting an intermittent issue wherein the IDE looses connection to the emulator, and continues trying to reconnect to it endlessly. Preventing new instances of the project from being run.
In the console:
Are messages that endlessly print about daemon not running, reconnecting, then connecting again.
When I try to launch an app once its in this state:
Causes Originally I believed this was happening because I had tried to launch the AVD while my windows laptop was in 'Energy Saver' Mode. But then it occurred outside of that state. It appears to be random, and happens regardless of network connection, performance throttle, app being run, etc.
Fixes The only thing I have gotten to work along the lines of fixing this problem have been completely wipiing android studio off my laptop (config and caches as well), and then reinstalling. I cannot however keep doing this for a problem that intermittently and randomly occurs.
I would like to know either what I am doing that could be causing this, or how to easily fix it when it does occur. Thank you, and if there is more information I can provide to assist with this, I can provide it.
Solutions tried
- Killing the PID associated with that TCP port. This did not work, as it seems like the daemon is connecting and disconnecting to it repeatedly, meaning its PID is constantly changing. Something is creating new processes for this daemon over and over again.
- Restarting/reinstalling android studio
- Moving project files to a new project (the connection deathloop remained)