I have a strange problem which cannot find any fix for it. Every thing is OK for the first time when i open emulator and AVD run normally. but after 5-10 minutes, the emulator disconnect,it lose it's internet connection and i cant connect to it,also the Android Studio completely stuck and nothing happen ! I should close the emulator and after that everything become normal again.
These are what I tested :
adb kill-server
and then
adb start-server
I also tried connecting and disconnecting again
adb connect localhost:5554
and also adb connect emualtor-5554
but still no result.
The worse part is that I can't use Android Studio anymore, even clicking on lines of codes don't work!
Every time I should close the emulator and open it again.
NOTE : I can't use Genymotion, and I don't want to use my device for debugging!
Can any body have any fix for this damn bug. it made me crazy ... thanks in advance
EDIT :
The problem is not something related to emulator. Today I try to debug with WiFi connection. Everything was good for a while till the problem happened again with my real device. In log it said :
deviceXXXXX disconnected
So the problem is with my ADB connection !
What I tested was adding port 5555 to firewall also added ADB to pass through firewall. But still the problem persists.