Android - could not install *smartsocket* listener
If you have the situation where this keeps happening and killing and restarting still doesn't work it may be a problem with your adb installation. I had to reinstall adb to resolve this problem:
- Reboot to ensure no instances of adb is running
- Launch SDK Manager in Android Studio: Tools->Android->SDK Manager
- Select the SDK Tools tab
- Deselect Android SDK Platform-Tools item
- Hit Apply
- Check the on screen logs to make sure the un-installation succeeded and that the SDK/platform-tools folder is empty.
This should completely remove adb from your SDK.
- Now re-select the Android SDK Platform-Tools item
- Hit apply
- Check the on screen logs that installation was successful.
I suspect in my case an update of the platform tools had failed perhaps because it failed to kill a running adb.exe and only a partial update was applied resulting in an unstable adb installation.
I fixed it by adding the ADB to path:
sudo ln -s ~/Android/Sdk/platform-tools/adb /bin/adb
And then killing the ADB server adb kill-server
and starting the server again adb start-server
.
Observation: I tried to kill java, tried to find the port where it was running using HTOP and Kill, aside from restarting everything but it was a pain in the ass
I solved this for myself by simply closing the shell I'd been running adb commands in and starting a new one, inspired by Vinayak Mestri's answer.
Open command prompt and enter following command
netstat -ano | findstr :5037
This will show procees id
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 832
832 is procees id
Now run command
tasklist | findstr processID (e.g tasklist | findstr 832)
It will show process name like bash.exe
just go to task manager and end the task bash.exe and use following command to start adb
adb start-server
voillllaaaaaaa........