unable to connect to adb.check the event log for a possible issue, verify that localhost entry is pointing to 127.0.0.1 or:: 1 for ipv4 or ipv6
This worked for me on Windows:
Goto cmd write %temp% hit enter -> delete all data from there.
Restart your Computer.
Open Android Studio now, it will work.