ADB服务器版本(36)与此客户端不匹配(39)[重复]

时间:2022-04-03 00:34:28

This question already has an answer here:

这个问题在这里已有答案:

After installing the Android O preview on a test device my ADB stopped working and started giving me this error.

在测试设备上安装Android O预览后,我的ADB停止工作并开始给我这个错误。

adb server version (36) doesn't match this client (39); killing... adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:333] Could not open interface: e00002c5 adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:294] Could not find device interface error: could not install *smartsocket* listener: Address already in use ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon

adb服务器版本(36)与此客户端不匹配(39);杀死... adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:333]无法打开界面:e00002c5 adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:294]找不到设备接口错误:无法安装* smartsocket * listener:地址已经在使用ADB服务器没有ACK *无法启动守护进程*错误:无法连接到守护进程

The only answers I have come across on this issue referred to Genymotion being out of sync with ADB but I don’t use Genymotion. Any help would be greatly appreciated. I have already wiped and reinstalled Android Studio as well as all of its tools and settings yet seem to still have this issue.

我在这个问题上遇到的唯一答案是Genymotion与ADB不同步,但我不使用Genymotion。任何帮助将不胜感激。我已经擦除并重新安装了Android Studio及其所有工具和设置,但似乎仍然存在此问题。

9 个解决方案

#1


27  

In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.

在我的情况下,当我将我的环境adb路径设置为〜/ .android-sdk / platform-tools(例如在安装了自制软件时安装android-platform-tools)时出现此错误,该版本为36,但Android Studio项目有Android SDK的下一个路径〜/ Library / Android / sdk,adb版本是39。

I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved

我已将PATH更改为平台工具〜/ Library / Android / sdk / platform-tools,错误已解决

#2


48  

This works for me...

这对我有用......

  • go to GenyMotion settings -> ADB tab
  • 转到GenyMotion设置 - > ADB选项卡
  • instead of Use Genymotion Android tools, choose custom Android SDK Tools and then browse your installed SDK.
  • 而不是使用Genymotion Android工具,选择自定义Android SDK工具,然后浏览已安装的SDK。

#3


6  

To add yet another potential solution, Helium by Clockworkmod has it's own version of ADB built in that kept being started. Exiting the Helium Desktop application resolves the issue.

为了增加另一个潜在的解决方案,Clockiummod的Helium拥有自己的内置ADB版本,并且一直在启动。退出Helium Desktop应用程序可以解决此问题。

#4


3  

First of all, please remove the "{Not using Genymotion}" from the title. It distracts readers like me who don't know what Genymotion is. The absurd here is that you got one answer with 21 points which says "go to GenyMotion settings"...

首先,请从标题中删除“{Not using Genymotion}”。它分散了像我这样不知道Genymotion是什么的读者。荒谬的是你得到了一个答案,其中21分说“去GenyMotion设置”......

The main point that all the others have missed, is that you will get this error when you have a running adb process in the background. So the first step is to find it and kill it:

所有其他人都错过的要点是,当您在后台运行adb进程时,您将收到此错误。所以第一步是找到并杀死它:

ps aux | grep adb
user          46803   0.0  0.0  2442020    816 s023  S+    5:07AM   0:00.00 grep adb
user          46636   0.0  0.0   651740   3084   ??  S     5:07AM   0:00.02 adb -P 5037 fork-server server

When you find it, you can kill it using kill -9 46636.

当你找到它时,你可以使用kill -9 46636杀死它。

In my case, the problem was an old version of adb coming from GapDebug. If you got this with GapDebug, get out of it and then do

就我而言,问题是来自GapDebug的旧版adb。如果你用GapDebug得到这个,那就离开它吧

adb kill-server
adb start-server

because with GapDebug in the background, when you kill the adb server, GapDebug will start its own copy immediately, causing the start-server to be ignored

因为在后台使用GapDebug,当你杀死adb服务器时,GapDebug会立即启动它自己的副本,导致启动服务器被忽略

#5


3  

I had the same error. In my case, using Appium, I had two versions of ADB

我有同样的错误。就我而言,使用Appium,我有两个版本的ADB

$ /usr/local/bin/adb version 36

$ / usr / local / bin / adb版本36

and

$ /Users/user/Library/Android/sdk/platform-tools/adb version 39

$ / Users / user / Library / Android / sdk / platform-tools / adb version 39

The solution was:

解决方案是:

  1. be sure that your $PATH in bash_profile is pointing to: /Users/user/Library/Android/sdk/platform-tools/

    确保bash_profile中的$ PATH指向:/ Users / user / Library / Android / sdk / platform-tools /

  2. stop the adb server: adb kill-server and check Appium is stopped.

    停止adb服务器:adb kill-server并检查Appium是否已停止。

  3. delete the adb version 36 (or you can rename it to have a backup): rm /usr/local/bin/adb

    删除adb版本36(或者您可以将其重命名为备份):rm / usr / local / bin / adb

  4. start adb server: adb start-server or just starting Appium

    启动adb服务器:adb start-server或刚启动Appium

#6


2  

You have two versions of ADB $ /usr/local/bin/adb version Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

你有两个版本的ADB $ / usr / local / bin / adb版本Android Debug Bridge版本1.0.36修订版0e9850346394-android

$ /Users/user/Library/Android/sdk/platform-tools/adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android

$ / Users / user / Library / Android / sdk / platform-tools / adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889 -android

You could see which one your PATH is pointing to (echo $PATH) but I fixed it with a adb stop-server on one version and a adb start-server on the other.

你可以看到你的PATH指向哪一个(echo $ PATH)但我用一个版本的adb stop-server和另一个版本的adb start-server修复了它。

#7


2  

I had the same problem with Android Studio - adb server version (37) doesn't match this client (39). I fixed by the following solution :

我在Android Studio中遇到了同样的问题 - adb服务器版本(37)与此客户端不匹配(39)。我通过以下解决方案修复:

In Android Studio go to Tools -> Android -> SDK Manager

在Android Studio中,转到工具 - > Android - > SDK Manager

In the SDK Tools tab untick Android SDK Platform-Tools, click Apply to uninstall.

在SDK Tools选项卡中取消选中Android SDK Platform-Tools,单击Apply以卸载。

I then renamed the Platform-Tools folder to Platform-ToolsOld

然后我将Platform-Tools文件夹重命名为Platform-ToolsOld

Then back in the SDK Manager re-tick the Platform-Tools to re-install.

然后返回SDK Manager重新勾选Platform-Tools以重新安装。

#8


2  

As mentioned by others here, that you have two adb's running ... And so from a Linux box perspective;

正如其他人所说,你有两个adb正在运行......所以从Linux盒子的角度来看;

  1. Uninstall your distro's android-tools

    卸载你的发行版的android工具

    # zypper -v rm android-tools
    
  2. Find where your other adb is

    找到您的其他adb的位置

    # find /home -iname "*adb"|grep -i android
    

It was at ;

它在;

/home/developer/Android/Sdk/platform-tools/adb
  1. Make a softlink to it in the /usr/bin folder

    在/ usr / bin文件夹中建立软链接

     ln -s /home/developer/Android/Sdk/platform-tools/adb  /usr/bin/adb
    
  2. Then;

    然后;

     # adb start-server
    

#9


0  

I think you have multiple adb server running, genymotion could be one of them, but also Xamarin - Visual studio for mac OS could be running an adb server, closing Visual studio worked for me

我认为你有多个adb服务器在运行,genymotion可能是其中之一,而且Xamarin - Mac OS的Visual Studio可以运行adb服务器,关闭Visual studio为我工作

#1


27  

In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.

在我的情况下,当我将我的环境adb路径设置为〜/ .android-sdk / platform-tools(例如在安装了自制软件时安装android-platform-tools)时出现此错误,该版本为36,但Android Studio项目有Android SDK的下一个路径〜/ Library / Android / sdk,adb版本是39。

I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved

我已将PATH更改为平台工具〜/ Library / Android / sdk / platform-tools,错误已解决

#2


48  

This works for me...

这对我有用......

  • go to GenyMotion settings -> ADB tab
  • 转到GenyMotion设置 - > ADB选项卡
  • instead of Use Genymotion Android tools, choose custom Android SDK Tools and then browse your installed SDK.
  • 而不是使用Genymotion Android工具,选择自定义Android SDK工具,然后浏览已安装的SDK。

#3


6  

To add yet another potential solution, Helium by Clockworkmod has it's own version of ADB built in that kept being started. Exiting the Helium Desktop application resolves the issue.

为了增加另一个潜在的解决方案,Clockiummod的Helium拥有自己的内置ADB版本,并且一直在启动。退出Helium Desktop应用程序可以解决此问题。

#4


3  

First of all, please remove the "{Not using Genymotion}" from the title. It distracts readers like me who don't know what Genymotion is. The absurd here is that you got one answer with 21 points which says "go to GenyMotion settings"...

首先,请从标题中删除“{Not using Genymotion}”。它分散了像我这样不知道Genymotion是什么的读者。荒谬的是你得到了一个答案,其中21分说“去GenyMotion设置”......

The main point that all the others have missed, is that you will get this error when you have a running adb process in the background. So the first step is to find it and kill it:

所有其他人都错过的要点是,当您在后台运行adb进程时,您将收到此错误。所以第一步是找到并杀死它:

ps aux | grep adb
user          46803   0.0  0.0  2442020    816 s023  S+    5:07AM   0:00.00 grep adb
user          46636   0.0  0.0   651740   3084   ??  S     5:07AM   0:00.02 adb -P 5037 fork-server server

When you find it, you can kill it using kill -9 46636.

当你找到它时,你可以使用kill -9 46636杀死它。

In my case, the problem was an old version of adb coming from GapDebug. If you got this with GapDebug, get out of it and then do

就我而言,问题是来自GapDebug的旧版adb。如果你用GapDebug得到这个,那就离开它吧

adb kill-server
adb start-server

because with GapDebug in the background, when you kill the adb server, GapDebug will start its own copy immediately, causing the start-server to be ignored

因为在后台使用GapDebug,当你杀死adb服务器时,GapDebug会立即启动它自己的副本,导致启动服务器被忽略

#5


3  

I had the same error. In my case, using Appium, I had two versions of ADB

我有同样的错误。就我而言,使用Appium,我有两个版本的ADB

$ /usr/local/bin/adb version 36

$ / usr / local / bin / adb版本36

and

$ /Users/user/Library/Android/sdk/platform-tools/adb version 39

$ / Users / user / Library / Android / sdk / platform-tools / adb version 39

The solution was:

解决方案是:

  1. be sure that your $PATH in bash_profile is pointing to: /Users/user/Library/Android/sdk/platform-tools/

    确保bash_profile中的$ PATH指向:/ Users / user / Library / Android / sdk / platform-tools /

  2. stop the adb server: adb kill-server and check Appium is stopped.

    停止adb服务器:adb kill-server并检查Appium是否已停止。

  3. delete the adb version 36 (or you can rename it to have a backup): rm /usr/local/bin/adb

    删除adb版本36(或者您可以将其重命名为备份):rm / usr / local / bin / adb

  4. start adb server: adb start-server or just starting Appium

    启动adb服务器:adb start-server或刚启动Appium

#6


2  

You have two versions of ADB $ /usr/local/bin/adb version Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

你有两个版本的ADB $ / usr / local / bin / adb版本Android Debug Bridge版本1.0.36修订版0e9850346394-android

$ /Users/user/Library/Android/sdk/platform-tools/adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android

$ / Users / user / Library / Android / sdk / platform-tools / adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889 -android

You could see which one your PATH is pointing to (echo $PATH) but I fixed it with a adb stop-server on one version and a adb start-server on the other.

你可以看到你的PATH指向哪一个(echo $ PATH)但我用一个版本的adb stop-server和另一个版本的adb start-server修复了它。

#7


2  

I had the same problem with Android Studio - adb server version (37) doesn't match this client (39). I fixed by the following solution :

我在Android Studio中遇到了同样的问题 - adb服务器版本(37)与此客户端不匹配(39)。我通过以下解决方案修复:

In Android Studio go to Tools -> Android -> SDK Manager

在Android Studio中,转到工具 - > Android - > SDK Manager

In the SDK Tools tab untick Android SDK Platform-Tools, click Apply to uninstall.

在SDK Tools选项卡中取消选中Android SDK Platform-Tools,单击Apply以卸载。

I then renamed the Platform-Tools folder to Platform-ToolsOld

然后我将Platform-Tools文件夹重命名为Platform-ToolsOld

Then back in the SDK Manager re-tick the Platform-Tools to re-install.

然后返回SDK Manager重新勾选Platform-Tools以重新安装。

#8


2  

As mentioned by others here, that you have two adb's running ... And so from a Linux box perspective;

正如其他人所说,你有两个adb正在运行......所以从Linux盒子的角度来看;

  1. Uninstall your distro's android-tools

    卸载你的发行版的android工具

    # zypper -v rm android-tools
    
  2. Find where your other adb is

    找到您的其他adb的位置

    # find /home -iname "*adb"|grep -i android
    

It was at ;

它在;

/home/developer/Android/Sdk/platform-tools/adb
  1. Make a softlink to it in the /usr/bin folder

    在/ usr / bin文件夹中建立软链接

     ln -s /home/developer/Android/Sdk/platform-tools/adb  /usr/bin/adb
    
  2. Then;

    然后;

     # adb start-server
    

#9


0  

I think you have multiple adb server running, genymotion could be one of them, but also Xamarin - Visual studio for mac OS could be running an adb server, closing Visual studio worked for me

我认为你有多个adb服务器在运行,genymotion可能是其中之一,而且Xamarin - Mac OS的Visual Studio可以运行adb服务器,关闭Visual studio为我工作