Whenever I try to run adb devices:
$ adb devices
* daemon not running. starting it now *
* daemon started su
System: Windows 7, Android Studio.
This error occurred when I ran adb devices from Windows Commandline.
The root cause was that the adb I was running from commandline was not the same adb running from Android Studio.
Solution:
First kill all running adb processes on the machine.
taskkill /F /IM adb.exe
Run your app from Android Studio.
Locate the exact File Location of adb.exe either from Windows Task Manager, OR by running the command below
wmic process where "name='adb.exe'" get ProcessID, ExecutablePath
On Windows Command prompt, run where adb to locate the adb that runs from command prompt. This path would be different from the one in Step 3 above.
Edit Windows system variable PATH. Delete the base path found in Step 4 from it.
After you have edited PATH, you can see the current contents of this variable by typing below command in a NEW command prompt (don't use old prompt.)
echo %PATH%
Now, run adb from command prompt. It should NOT show any "server out of date error"!