Whenever I try to run adb devices
:
$ adb devices
* daemon not running. starting it now *
* daemon started su
I have seen the following error twice in the past week or so:
adb server version (40) doesn't match this client (41)
I fixed it by rebooting my PC every time. I do not know how to explain it.
I tried killing and starting adb via command line multiple timea, restarting Android Studio multiple times to no avail. Task Manager does not show adb.exe.
I am running Android Studio 3.4 on Windows 10 (V1809, Build:17763.503)
Edit (2019-05-30): When this happened for the 3rd time, I closed all applications, then restarted Android Studio, and the problem was solved. It seems that another application causes this. I will report back once I find the culprit.
Edit (2019-05-30): I have finally found the culprit - Visual Studio paired with a Macbook Pro for building and debugging an iOS app. Once VS is closed or the pairding is disabled, adb becomes normal.