adb 服务器版本与此客户端不匹配
每当我尝试运行adb devices
:
$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
它说守护进程没有运行并重新启动守护进程。
然后,如果我再次运行 adb devices,它会执行相同的操作 -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
然后,如果我再次运行它,它会再次执行完全相同的操作 -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
请帮忙!
另外,我的 DDMS 不断向我提供以下消息 -
[2011-02-23 16:17:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
以下是 adb 重新启动之前的日志 -
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [480]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi V qct_loc_eng_inject_xtra_data, inject part = 100, len = 167, len = 167
1291 lib_locapi V qct_loc_eng_inject_xtra_data, total part = 100, len = 167
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [248]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi D qct_loc_eng_inject_xtra_data: injected 39767, SUCCESS
1291 lib_locapi V inject_xtra_waiting = flase
1291 GpsLocationProvider D Releasing wakelock
1291 WifiService D releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@47aead50}
1291 WifiService D enable and start wifi due to updateWifiState
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I unblock rmt_storage client thread
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 1
1291 BatteryStatsImpl I notePhoneSignalStrengthLocked: 4->3
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I unblock rmt_storage client thread
1291 PowerManagerService D New lightsensor value:40, lcdValue:143
1291 PowerManagerService D lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 2
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [80]
1291 locapi_rpc_glue V Callback received: 80 (cb_id=0x50B0000 handle=1)
1291 RPC D written RPC packet size: [28]
1470 usicWidgetController D unbindMusicPlaybackService()
1707 MediaPlaybackService E BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0
1291 NotificationService V Battery Full, Charging
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 lights E write ok string=1,len=1
1707 MediaPlayer.java D setOnCompletionListener being cleaned to null
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 NotificationService V Turn off Jogball/OJ LED
1291 NotificationService D cancelNotification, ACTION_NOTIFICATION_REMOVE,pkg=com.htc.music,id=1
1291 AudioService I AudioFocus abandonAudioFocus() from android.media.AudioManager@476ddee0com.htc.music.MediaPlaybackService$5@476dd838
Whenever I try to run adb devices
:
$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
It says daemon is not running and restarts the daemon.
Then, if I run adb devices again, it does the same thing -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
Then, if I run it again, it again does the exact same thing -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
Please help!!
Also, my DDMS keeps giving me the following message -
[2011-02-23 16:17:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
Here are the logs from just before adb restarts -
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [480]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi V qct_loc_eng_inject_xtra_data, inject part = 100, len = 167, len = 167
1291 lib_locapi V qct_loc_eng_inject_xtra_data, total part = 100, len = 167
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [248]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi D qct_loc_eng_inject_xtra_data: injected 39767, SUCCESS
1291 lib_locapi V inject_xtra_waiting = flase
1291 GpsLocationProvider D Releasing wakelock
1291 WifiService D releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@47aead50}
1291 WifiService D enable and start wifi due to updateWifiState
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I unblock rmt_storage client thread
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 1
1291 BatteryStatsImpl I notePhoneSignalStrengthLocked: 4->3
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I unblock rmt_storage client thread
1291 PowerManagerService D New lightsensor value:40, lcdValue:143
1291 PowerManagerService D lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 2
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [80]
1291 locapi_rpc_glue V Callback received: 80 (cb_id=0x50B0000 handle=1)
1291 RPC D written RPC packet size: [28]
1470 usicWidgetController D unbindMusicPlaybackService()
1707 MediaPlaybackService E BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0
1291 NotificationService V Battery Full, Charging
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 lights E write ok string=1,len=1
1707 MediaPlayer.java D setOnCompletionListener being cleaned to null
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 NotificationService V Turn off Jogball/OJ LED
1291 NotificationService D cancelNotification, ACTION_NOTIFICATION_REMOVE,pkg=com.htc.music,id=1
1291 AudioService I AudioFocus abandonAudioFocus() from android.media.AudioManager@476ddee0com.htc.music.MediaPlaybackService$5@476dd838
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(30)
您是否将 Genymotion 用于虚拟设备?
如果是的话,这个错误可能是因为 Genymotion 中的 ADB 与 Android SDK 中的 ADB 冲突(使用相同的端口号),要解决此问题,只需转到
settings
=>;选择ADB
选项卡=>单击选项使用自定义 Android SDK 工具
并设置您的 SDK 文件夹>配置此选项后,尝试进入
adb
放置的文件夹platform-tools
并执行以下命令来重新启动 adb:./adb Kill-server
./adb start-server
*提示:您可以在运行上述命令之前关闭 Genymotion 进程
希望有所帮助。
Are you using Genymotion for a virtual device?
if yes this error probably came out because ADB from Genymotion conflicted with your ADB from Android SDK(using same port number), to fix this simply go to
settings
=> chooseADB
tab => click on the optionUse custom Android SDK Tools
and set your SDK folderafter you configure this, try to restart your adb by going into folder
platform-tools
whichadb
placed and do this command:./adb kill-server
./adb start-server
*tips: You may close the process of Genymotion before running the command above
Hope this help.
我从计算机上卸载了 Dell PC Suite 和 HTC Sync,此问题就消失了。
编辑:详细说明此问题的原因:HTC 同步带有自己的 ADB 服务器。它会更新您的 PATH 环境变量以指向其服务器版本。编辑 PATH 变量并删除对 HTC Sync 目录的引用。现在您再次使用 Google 的 ADB。
I uninstalled Dell PC Suite and HTC Sync from my computer and this problem went away.
EDIT: To elaborate a bit on the cause of this problem: HTC sync comes with an ADB server of its own. And it updates your PATH environment variable to point to its version of the server. Edit the PATH variable and remove the reference to the HTC Sync directories. Now you're using Google's ADB again.
我发现我偶尔需要手动显式终止并重新启动服务器:
这种冲击通常足以使其再次恢复正常,并防止重复
adb 服务器过时。杀死...
消息。I find I occasionally need to explicitly kill and restart the server manually:
This shock is generally enough to get it back on its feet again, and prevents repeated
adb server is out of date. killing...
messages.确保没有其他 adb 进程在运行
系统上可能有多个 adb 进程正在运行。 Android Reverse Tether 等工具可能会使用其自己版本的 adb工具,因此内存中的版本可能与从命令行(通过路径变量)运行的版本冲突。
Windows
在 Windows 中,按 CTL+Shift+ESC 访问任务管理器,在图像名称列中排序,然后右键单击并选择结束进程来终止
adb.exe
的所有实例。请注意,下面有多个adb.exe
实例:Linux (Android)
在 Linux 环境中,只需使用
kill -9
命令即可。类似的事情在运行adb
的 Android 设备上运行(使用ps
输出,使用grep
搜索以adb
开头的进程code>,从adb
进程获取进程 ID,并将该 ID 发送到kill -9
命令):然后,重新启动 adb
一旦
adb
进程 - 以及由此产生的冲突 - 已解决,然后再次尝试从命令行运行adb
:Ensure that there are no other adb processes running
There may be more than one adb process running on the system. Tools such as the Android Reverse Tether may use their own version of the adb tool, hence the version in memory may conflict with the version run from the command line (via the path variable).
Windows
In Windows, press CTL+Shift+ESC to access Task Manager, sort in the Image Name column, then kill all instances of
adb.exe
by right-clicking, and choosing End Process. Note that there are multiple instances ofadb.exe
below:Linux (Android)
In a Linux environment, just use the
kill -9
command. Something like this worked on an Android device runningadb
(useps
output, search usinggrep
for a process starting withadb
, get the Process ID from theadb
process(es), and send that ID to thekill -9
command):Then, restart adb
Once the
adb
processes - and thus conflicts - are resolved, then retry runningadb
from the command-line again:有一个快速的方法来做到这一点
首先
然后是
解决问题的最快方法
Got a quick way to do it
First
Then
Fastest way to fix the issue
这是因为您运行的 adb 不是 SDK 中包含的 adb。如果在 Linux 上,检查 adb 二进制文件位于何处
如果没有指向 ANDROID_SDK/platform-tools/adb,则您正在运行安装在计算机上不同位置的旧版本 adb。
除了 SDK 提供的 adb 之外,运行 adb 没有任何问题,但缺点是当 android SDK 更新时它不会自动更新,这就是为什么你会遇到这个过时的版本问题。
更容易修复并避免将来出现此问题,将旧的(误导性的)adb 二进制文件重命名为其他文件。
请按照以下步骤解决此问题。
This is caused because you are running a adb other than the one included in the SDK. If on linux check where is the adb binary located
If not pointing to ANDROID_SDK/platform-tools/adb then you are running some old version of adb installed on a different location on the machine.
Nothing wrong running adb other than the one provided with SDK but the downside is it is not updated automatically when the android SDK is updated and that's why you running into this out-dated version issue.
The easier fix and to avoid this issue in future rename the older (misleading) adb binary file to something else.
Follow the steps to resolve this issue.
在我的机器(Ubuntu 14.04 和 Genymotion 2.5.2)中,问题的根源在于,我有 2 个不同版本的 adb 文件。
(之前,为了缩小这个问题的来源,我已经有了 Genymotion 的“设置”>“使用自定义 Android SDK 工具”,按照 Aditya Kresna Permana 的建议,指的是我的机器安装的 Android SDK 目录。我也尝试过杀死并启动 adb 服务器,但没有成功。来自网络的其他解决方案)。
然后看到,从我的 Android SDK 安装目录“~/Android/Sdk/platform-tools”运行
adb 版本
生成了 - “Android Debug Bridge version 1.0.32”但是,
adb 版本< /code> 来自“/usr/bin”目录的命令产生了-“Android Debug Bridge version 1.0.31”
所以就跟着 - http://bernaerts.dyndns.org/linux/74-ubuntu/328-ubuntu-trusty-android-adb-fastboot-qtadb 更新“/usr/bin”中的 adb
现在运行
adb devices
可以按预期完美运行,并且它还解决了之前我的 PhoneGap (Cordova) 应用程序未与集成的相关问题。现在,Genymotion 的虚拟设备显然也解决了这个问题。
In my machine (Ubuntu 14.04 and Genymotion 2.5.2) the source of the problem was that, I had 2 adb files of different versions.
(Before, narrowing down this problem source, I already had Genymotion's Settings > "Use custom Android SDK tools" referring to my machine's installed Android SDK directory as advised by Aditya Kresna Permana. I also tried with killing and starting the adb server and few other solutions from around the web).
Then saw, that running
adb version
from my Android SDK installation directory “~/Android/Sdk/platform-tools” produced - "Android Debug Bridge version 1.0.32"But,
adb version
command from “/usr/bin” directory produced- “Android Debug Bridge version 1.0.31"So just followed - http://bernaerts.dyndns.org/linux/74-ubuntu/328-ubuntu-trusty-android-adb-fastboot-qtadb to update the adb in “/usr/bin”
And now running
adb devices
works perfectly as expected.And it also solved the associated problem that, before my PhoneGap (Cordova) app was not getting integrated with the Genymotion's virtual device. Now obviously that problem solved as well.
我刚刚退出 HTC Sync,再次尝试,成功了。
注意:手机黑屏(锁定),我刚刚打开它,我的应用程序正在运行。 :)
I just exited HTC Sync, tried again, and it worked.
Notice: Phone went black(locked), I just turned it on, and there was my application running. :)
系统:Windows 10
我的问题:
将 Genymotion 设置为指向自定义 SDK 没有任何影响。我仍然收到:
我发现整个系统中使用的 ADB 版本存在差异。这是我用来查找它们的命令:
这产生了结果:
导航到每个目录并运行:
允许我看到 Expo 正在运行 ADB 版本:
而使用自定义 SDK 的 Genymotion 具有版本(c:\ Users \ kyle \ AppData \Local\Android\Sdk\platform-tools\adb.exe):
作为测试,我从中取出了 adb 文件(adb.exe、AdbWinApi.dll、AdbWinUsbApi.dll)
并将它们放入备份文件夹中。然后我将位于的 adb 文件移动
到同一位置。我用以下命令杀死了 adb:
由于我的 Genymotion 设备已经在运行,这导致 adb 服务器自动重新启动。我按下 Expo XDE 内部的“重新启动”按钮,它立即开始工作。以下是我在凌晨 1:13:04 按下重启按钮的日志:
结论:Genymotion 和 Expo 可能需要使用相同版本的 adb,以便 Expo 可以与模拟设备正确通信。将 Genymotion 指向您的 Android SDK 位置并确保 Expo XDE 具有相同的版本将允许设备之间进行正确的通信。我将 Expo XDE 版本移至 SDK 位置,但您也许可以采用其他方式(获取 sdk ADB 文件并将它们放在 Expo XDE 资源位置中)。
PS
我已经浏览了与此问题相关的所有 stackoverflow 帖子。只是为了让你们知道我的任务管理器显示了 adb.exe 的三个实例正在运行。如果你杀了他们中的任何一个,他们就会回来。
希望这有帮助/干杯
System: Windows 10
My issue:
Setting Genymotion to point to the custom SDK didn't have any affect. I still received the:
What I discovered was there was a difference in ADB versions being used throughout the system. Here is the command I used to find them:
This produced the results:
Navigating to each directory and running:
Allowed me to see that Expo was running ADB version:
While Genymotion using the custom SDK had version (c:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe):
As a test I took the adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) from
and placed them into a backup folder. I then moved the adb files located at
into that same location. I killed adb with:
which caused a restart of the adb server automatically due to having my Genymotion device already running. I hit the "Restart" button inside of the Expo XDE and it immediately began working. Here is the log where I hit the restart button at 1:13:04 AM:
Conclusion: Genymotion and Expo may need to use the same version of adb so that Expo can properly communicate with the simulated device. Pointing Genymotion to your android SDK location as well as ensuring Expo XDE has that same version will allow correct communication between devices. I moved the Expo XDE version to the SDK location, but you might be able to go the other way (take the sdk ADB files and place them in the Expo XDE resource location).
P.S.
I've been all through the stackoverflow posts related to this issue. Just so you guys know my task manager shows three instances of adb.exe running. If you kill any of them they just come back.
Hope this helps /cheers
设备上的 ADB 守护进程 (adbd) 似乎与主机上的 ADB 服务器进程关于它们正在使用的协议版本不一致。您正在运行哪个版本的 SDK?您正在调试的设备上的操作系统版本是什么?
您可能需要做的实际上是降级 SDK 工具的版本,以便 ADB 守护进程和进程保持一致。我认为服务器进程是完全向后兼容的,但这可能是不向后兼容的极端情况之一。 Google 并没有宣传您可以获取他们的旧 SDK 工具包,但可以通过查看档案区 找到它们。 http://developer.android.com。
It would appear that the ADB daemon on the device (adbd) is disagreeing with the ADB server process on your host computer as to which version of the protocol they are speaking. Which version of the SDK are you running and what is the OS version on the device you are debugging?
What you might need to do is actually downgrade your version of the SDK tools so that the ADB daemon and process are in agreement. I thought the server process was completely backward compatible, but this could be one of those corner cases where it doesn't. Google doesn't advertise the fact that you can get their old SDK tools packages, but they can be found by looking in the archives area at http://developer.android.com.
我遇到了类似的问题,我尝试使用
adb
例如adb logcat
提供了此错误输出:adb server version (40) does not match this client ( 36);杀死...
这个解决方案在2018年使用终端在Android Studio 3.2.1上的Ubuntu 18.04上为我工作。
命令如下:
您可能需要根据系统上
Android/
的路径调整cp
命令参数。第二一代人对我的来源表示敬意:https://stackoverflow.com/a/40991118/7015599
I experienced a similar problem where my attempts to use
adb
such asadb logcat
provided this error output:adb server version (40) doesn't match this client (36); killing...
This solution worked for me in 2018 on Ubuntu 18.04 from Android Studio 3.2.1 using terminal.
The commands are as follows:
You may need to adjust the
cp
command arguments based on the path toAndroid/
on your system.2nd generation kudos to my source: https://stackoverflow.com/a/40991118/7015599
我只是完全关闭 htc 同步应用程序并再次尝试。它按预期工作。
I simply closed the htc sync application completely and tried again. It worked as it was supposed to.
在这件事上我把头撞到墙上。当我安装最新版本的 HTCsync (3.0.5579) 时,这种情况开始发生。由于某种原因,adb.exe 在任务管理器中多次出现,并且我多次收到 adb 服务器已过期的终止错误。我在HTC同步目录和Android SDK platform-tools目录中找到了adb.exe版本。我的路径设置正确地指向 android SDK 目录,但没有看到 HTC Sync 路径(也许我错过了一些东西,但我不这么认为)。不管怎样,为了解决这个问题,我只是重命名了 HTC Sync 目录中的 adb.exe 文件,然后一切又恢复正常了。这可能不是解决此问题的正确方法,但它对我有用。
I beat my head against the wall on this one. This started happening when I installed the latest version of HTC sync (3.0.5579). For some reason adb.exe was showing up multiple times in the task manager and I was getting the adb server is out of date killing errors multiple times. I found the adb.exe version in the HTC sync directory and the Android SDK platform-tools directory. I had the path setup correctly pointing at the android SDK directory and didn't see the HTC Sync path (maybe I was missing something, but I don't think so). Anyway, to fix the issue, I simply renamed the adb.exe file in the HTC Sync directory and everything worked again. This may not be the right way to go about this fix, but it worked for me.
系统:Windows 7、Android Studio。
当我从 Windows 命令行运行
adb devices
时,出现此错误。根本原因是我从命令行运行的adb与从Android Studio运行的adb不同。
解决方案:
首先杀死机器上所有正在运行的adb进程。
taskkill /F /IM adb.exe
从 Android Studio 运行您的应用。
从 Windows 任务管理器或通过 运行下面的命令
wmic process where "name='adb.exe'" get ProcessID, ExecutablePath
在 Windows 命令提示符下,运行
where adb
以找到从命令提示符运行的 adb。此路径与上面步骤 3 中的路径不同。编辑 Windows 系统变量 PATH。从中删除步骤 4 中找到的基本路径。
编辑 PATH 后,您可以通过在新命令提示符中键入以下命令来查看此变量的当前内容(不要使用旧提示符。)
echo %PATH%
现在,从命令提示符运行 adb。它不应该显示任何“服务器过期错误”!
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"!
它帮助我
停止 HTC Sync(在系统托盘中)
重命名我在该路径中找到的 HTC 的
adb.exe
:<前><代码> C:\Program Files (x86)\HTC\HTC Sync 3.0\adb.exe。
It helped me to
stop the HTC Sync (in system tray)
rename HTC's
adb.exe
which I found at that path:请尝试以下操作:
关闭 Eclipse 应用程序。
adbkill-server
重新启动 Eclipse。
Try this:
Close the Eclipse application.
adb kill-server
Restart Eclipse.
首先关闭所有使用ADB的东西。 (Android Studio、Eclipse、模拟器(还有 Bluestack))
然后就
我而言,我刚刚收到 Studio 的更新。
First close All the things which use ADB. (Android Studio, Eclipse, Emulator(Bluestack as well))
and then do
In my case I just got update of Studio.
对于使用Android studio开发的人来说:
如果使用命令行安装adb,可能会与Flutter安装的adb版本冲突。
问题根源分析
您可以轻松检查两个不同版本是否存在此问题:
然后比较
adb 版本
之间的返回值(位于 usr/bin/adb,很可能是 / 的符号链接) usr/lib/android-sdk/platform-tools/adb )和~/Android/Sdk/platform-tools/adb version
您将得到这种输出:
我的建议如下: < strong>不要依赖
sudo apt-get install adb
解决方案
1/您首先要删除通过命令行安装的adb:(这样更干净比
sudo rm usr/bin/adb
2/ 然后创建从 sdk 到 usr/bin 的符号链接(已提供最佳答案):
现在您可以使用不同的命令行
adb devices
、adb start-server
、adb Kill-server
For people developing with Android studio:
if you install adb with the command line it will probably conflict with the adb version installed by Flutter.
Analysis of issue's origin
You can check that you have this problem with 2 different versions easily:
And then compare the return value between
adb version
(located at usr/bin/adb and most likely a symbolic link for /usr/lib/android-sdk/platform-tools/adb ) with~/Android/Sdk/platform-tools/adb version
You will get this kind of output:
My advice is hence the following: DO NOT RELY ON
sudo apt-get install adb
Solution
1/ You first want to remove adb installed through the command line: (this is way cleaner than
sudo rm usr/bin/adb
2/ Then create symbolic link from the sdk to usr/bin (top answer already provided):
Now you can use the different command lines
adb devices
,adb start-server
,adb kill-server
好的,还有另一个与“Lenovo Photo Companion”一起分发的 adb.exe 实例。我的一个朋友有一台联想 Yoga 笔记本,安装了这个软件,其中包含另一个 adb.exe
卸载它解决了问题。
Okay, there is another instance of adb.exe distributed with "Lenovo Photo Companion". A friend of mine has a Lenovo Yoga notebook and had this software installed which includeded another adb.exe
Deinstalling it solved the problem.
不幸的是,我还没有足够的声誉来发表评论。但标记为答案的回复让我朝着正确的方向前进。
尽管我安装了 HTC Sync Manager,但我在路径中没有看到任何与 HTC Sync Manager 相关的内容。我目前没有使用 HTC 设备,仅安装了同步管理器来帮助解决驱动程序问题。卸载 HTC 同步管理器后,这个问题就消失了。
希望这对其他人有帮助。
Unfortunately I do not have enough reputation to comment yet. But the response marked as an answer sent me in the right direction.
I did not see anything in my path related to HTC Sync Manager, though I had it installed. I'm not working with my HTC device at the moment, and only had the sync manager installed to help with driver issues. Once uninstalling the HTC sync manager this issue went away for me.
Hope this helps someone else.
操作系统:Ubuntu
有超过 1 个 adb 正在运行。检查当前的 adb:
通常结果将是:
通过以下方式删除此旧版本:
OS: Ubuntu
There are more than 1 adb are running. Check the current adb:
Normally the result will be:
Delete this older version by:
如果您尝试交互的设备是通过 USB 连接的物理手机,您可以将其拔出并重新插回,它应该可以工作。我认为有时它会变得不同步。
If the device you're trying to interact with is a physical phone connected via USB, you can unplug it and plug it back and and it should work. Sometimes it just gets out of sync I think.
我在我的一台开发机器上遇到了这个问题(全部运行 Windows 7 x64),而所有其他机器的 adb 工作正常。我遇到这个问题的原因是我的 adb.exe 旧版本位于 %android-sdk%\tools 中,而较新的 Android SDK 的 adb.exe 位于 < strong>%android-sdk%\platform-tools
从 %android-sdk%\tools 中删除旧的 adb.exe 并将 %android-sdk%\platform-tools 添加到 %PATH% 解决了这个问题
或更普遍,查找路径中任何过期的 adb 可执行文件,只需使用 Android SDK 提供的最新版本
I had this issue on one of my development machines (all run windows 7 x64) while all other machines' adb work normally. The reason I ran into this issue is I have an old version of adb.exe reside in %android-sdk%\tools while newer Android SDKs have adb.exe under %android-sdk%\platform-tools
remove the older adb.exe from %android-sdk%\tools and add %android-sdk%\platform-tools to %PATH% solves this issue
or more generally, hunt down any adb executable in your path that are out of date, just use the latest one provided with Android SDK
我浏览了 SO 上的所有答案,但它对我不起作用。当我从任务管理器中杀死 adb.exe 进程时,它不断重新打开它,原因是 Droid Explorer 正在后台运行。
通过任务管理器终止 DE 进程,然后终止 adb.exe(并通过“adb start-server”从控制台再次运行它)对我来说很有效。
这对于许多人来说很有用已root他们的设备。
I went through all the answers on SO and it didn't work for me. When I killed the adb.exe process from Task Manager, it kept reopening it and the reason was that Droid Explorer was working in the background.
Killing the DE process via Task Manager and then killing adb.exe (and running it again from the console through 'adb start-server' worked for me.
This can be useful for many people who have rooted their devices.
就我而言,问题是由 Virteous Ten Studio 引起的,它在
External/ADB
目录中有 adb.exe。去那里运行
.\adb.exe Kill-server
就可以了。In my case, the problem was caused by Virtuous Ten Studio, which has the adb.exe in
External/ADB
directory.Go there and run
.\adb.exe kill-server
and you'll be good.在我的例子中,这是由于在与 Android Studio 相同的计算机上运行带有 Android Xamarin 项目的 Visual Studio 造成的 - 每个 IDE 都运行不同的 adb 服务器版本。我关闭了 Visual Studio,错误就消失了。
This was caused in my case by running Visual Studio with an Android Xamarin project on the same machine as Android Studio - each IDE had a different adb server version running. I closed Visual Studio and the error went away.
在过去一周左右的时间里,我两次看到以下错误:
我每次都通过重新启动电脑来修复它。我不知道该如何解释。
我多次尝试通过命令行杀死并启动 adb,多次重新启动 Android Studio,但无济于事。任务管理器不显示 adb.exe。
我在 Windows 10 上运行 Android Studio 3.4(V1809,内部版本:17763.503)
编辑 (2019-05-30):
当第三次发生这种情况时,我关闭了所有应用程序,然后重新启动Android Studio,问题就解决了。似乎是另一个应用程序导致了这种情况。一旦找到罪魁祸首,我会报告。
编辑(2019-05-30):我终于找到了罪魁祸首 - Visual Studio 与 Macbook Pro 搭配使用来构建和调试 iOS 应用程序。一旦关闭VS或者禁用配对,adb就恢复正常。
I have seen the following error twice in the past week or so:
I fixed it by rebooting my PC every time. I do not know how to explain it.
I tried killing and starting adb via command line multiple timea, restarting Android Studio multiple times to no avail. Task Manager does not show adb.exe.
I am running Android Studio 3.4 on Windows 10 (V1809, Build:17763.503)
Edit (2019-05-30):
When this happened for the 3rd time, I closed all applications, then restarted Android Studio, and the problem was solved. It seems that another application causes this. I will report back once I find the culprit.
Edit (2019-05-30): I have finally found the culprit - Visual Studio paired with a Macbook Pro for building and debugging an iOS app. Once VS is closed or the pairding is disabled, adb becomes normal.
我做了以下操作,我在 mac OS 中遇到了同样的不匹配错误,我试图安装一个 apk。
mv /usr/local/bin/adb /usr/local/bin/old_adb
brew cask install android-platform-tools
或brew reinstall -- cask android-platform-tools
adb Kill-server
adb start-server
如果您尝试安装 apk,请重新安装并检查。
I did the following I had the same mis match error in mac OS, I was trying to install an apk.
mv /usr/local/bin/adb /usr/local/bin/old_adb
brew cask install android-platform-tools
orbrew reinstall --cask android-platform-tools
adb kill-server
adb start-server
If you are trying to install apk, reinstall and check.
您是否尝试使用 SDK 版本 8。由于设备是 2.2,而您的 SDK 是 10,因此可能存在冲突。
祝您降级工作顺利!
Did you try using the SDK version 8. Since the device is in 2.2, and your SDK is at 10, there might be conflict.
Best of luck with your downgrading efforts!
如上所述,该问题是由于 HTC Sync 附带的 adb.exe 版本冲突造成的。从 PATH 中删除它不会有帮助,因为在后台不断运行的 htcUPCTLoader.exe 仍然会重新启动错误的 ADB 版本。
一种解决方案是从 HTC Sync 文件夹中完全删除 adb.exe,但这会破坏 HTC Sync。
我刚刚编写了一个简单的工具,用它替换了旧的adb.exe一个从 SDK 目录调用最新的 adb.exe 的存根,消除了冲突(例如,HTC Sync 附带的版本 1.0.25 和 Android SDK 附带的 1.0.29 版本)。
该工具可以从 http://visualgdb.com/adbfix
As mentioned above, the problem comes due to a conflicting version of adb.exe shipped with HTC Sync. Removing it from PATH won't help, as htcUPCTLoader.exe that constantly runs in the background will still re-launch the wrong ADB version.
One solution would be to completely remove adb.exe from the HTC Sync folder, however this would break HTC Sync.
I've just coded a simple tool that replaces the old adb.exe with a stub that invokes the latest adb.exe from the SDK directory eliminating the conflicts (e.g. version 1.0.25 coming with HTC Sync and 1.0.29 with Android SDK).
The tool can be downloaded from http://visualgdb.com/adbfix