adb server version doesn't match this client

后端 未结 30 3007
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 09:49

Whenever I try to run adb devices:

            $ adb devices
            * daemon not running. starting it now *
            * daemon started su         


        
30条回答
  •  无人共我
    2020-11-22 10:16

    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:

    1. First kill all running adb processes on the machine.

      taskkill /F /IM adb.exe

    2. Run your app from Android Studio.

    3. 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

    4. 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.

    5. Edit Windows system variable PATH. Delete the base path found in Step 4 from it.

    6. 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"!

提交回复
热议问题