Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.58k stars 10.82k forks source link

adb server version (39) doesn't match this client (41); killing... #3273

Open vishnureji opened 2 years ago

vishnureji commented 2 years ago

Environment

Describe the bug A clear and concise description of what the bug is.

On errors, please provide the output of the console (and adb logcat if relevant).

scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
/usr/local/share/scrcpy/scrcpy-server:...ed. 152.9 MB/s (19038 bytes in 0.000s)
ERROR: Exception on thread Thread[main,5,main]
java.lang.NumberFormatException: For input string: "1.24"
    at java.lang.Integer.parseInt(Integer.java:615)
    at java.lang.Integer.parseInt(Integer.java:650)
    at com.genymobile.scrcpy.Server.createOptions(Server.java:49)
    at com.genymobile.scrcpy.Server.main(Server.java:69)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:374)
ERROR: Server connection failed

Please do not post screenshots of your terminal, just post the content as text instead.

rom1v commented 2 years ago

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#conflicts-between-adb-versions

rom1v commented 2 years ago

java.lang.NumberFormatException: For input string: "1.24"

Moreover, you're using an old scrcpy-server with a new client.

ByteBreacher commented 1 year ago

THIS WILL REALLY HELP YOU (almost 90% of the time this might be the problem)

  1. Download the latest version of ADB from the official Android developer website:

    [https://developer.android.com/studio/releases/platform-tools]

  2. Extract the contents of the ADB ZIP file to a directory on your system, such as ~/Tools.

  3. Add the directory containing the ADB binary to your PATH environment variable by adding the following line to your .bashrc file:

        `export PATH=$PATH:/path/to/adb-file-just-downloaded-and-extracted/`
  4. Reload the .bashrc file by running the following command: . ~/.bashrc

  5. Try running scrcpy again and see if the error message goes away.

b-Istiak-s commented 1 year ago

└─$ adb devices adb server version (39) doesn't match this client (41); killing...

┌──(istiak㉿Istiak)-[~] └─$ /snap/bin/scrcpy -s 8399405c scrcpy 1.25 https://github.com/Genymobile/scrcpy adb server version (41) doesn't match this client (39); killing...

┌──(istiak㉿Istiak)-[~] └─$ /snap/bin/scrcpy
scrcpy 1.25 https://github.com/Genymobile/scrcpy ERROR: Could not find any ADB device ERROR: Server connection failed

rom1v commented 1 year ago

Try a non snap version. Snap packages its own adb.

raycekar commented 7 months ago

Had same issue. This is what i did to get it to work as the snap package itself has it's own adb version (from what i believe) snap run scrcpy.adb connect x.x.x.x where x.x.x.x is the ip of interest snap run scrcpy.adb devices to ensure i am connected snap run scrcpy.scrcpy to connect

buluxianfeng commented 2 months ago

https://blog.csdn.net/buluxianfeng/article/details/142254736?spm=1001.2014.3001.5501 亲测已解决!