adb server version (40) doesn't match this client (41); killing

23,164

In my case the problem occurred because of two ADB paths. I actually moved my Android SDK (due to lack of space in system drive) from one path to another and set up the environment variables accordingly. Starting and killing the server didn't help so I followed this thread in GitHub

But unlike that thread, instead of replacing the files in scrcpy folder, I replaced the files in C:\Program Files\Genymobile\Genymotion\toolscopied the files from sdk\platform-tools

replaced the files in the Genymobile\Genymotion\tools

And it started working after that

Share:
23,164
brian omondi
Author by

brian omondi

Updated on January 15, 2021

Comments

  • brian omondi
    brian omondi over 3 years

    Couldn't start project on Android:

    adb server version (40) doesn't match this client (41); killing...
    could not read OK from ADB Server
    * failed to start daemon
    adb.exe: failed to check server version: cannot connect to daemon
    

    i have installed android platform development tools but it still doesn't work even after changing Genymotion settings to use my android Software development kit instead of its default android tools

  • brian omondi
    brian omondi almost 5 years
    which package name specifically
  • Jane Alam
    Jane Alam almost 5 years
    Your app package name
  • brian omondi
    brian omondi almost 5 years
    now i get this error could not read ok from ADB Server * failed to start daemon error: cannot connect to daemon - waiting for device - error: cannot connect to daemon
  • brian omondi
    brian omondi almost 5 years
    plus when i do expo start i get the same error as before
  • Jane Alam
    Jane Alam almost 5 years
    You can try kill server and restart the server again adb kill-server adb start-server OR 1. adb kill-server 2. sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb 3. sudo chmod +x /usr/bin/adb **4. adb start-server ** Try to execute the above 4 commands one by one.
  • brian omondi
    brian omondi almost 5 years
    i am on a windows pc so sudo cp command are not recognizable
  • Jane Alam
    Jane Alam almost 5 years
    Ignore **sudo for windows. From your Android studio command line run the above command.
  • Martins
    Martins almost 4 years
    You saved me 2 hours of Googling dude, works like a charm.
  • Jalakam Kiran
    Jalakam Kiran over 3 years
    Thanks a lot dude...You saved lot of my time