adb logcat连接不上设备 |
您所在的位置:网站首页 › ucardvr找不到设备 › adb logcat连接不上设备 |
windows系统下使用adb devices输出出来没有设备,插拔一开始输出出来了几秒钟再输出又没了。 使用adb kill-server然后再adb start-server显示 daemon not running. starting it now on port 5037 * CreateProcess failure, error 2 * failed to start daemon *error: cannot connect to daemon 疯掉了,后来找到这个文章,按照如此,就修复好了。 以下为原文章,转载地址:https://blog.csdn.net/xishuluoye/article/details/17880663 ------------------------------------------------------------ 问题: win7 64位系统使用adb命令连接模拟器,在5037端口未被占用情况下,报以下错误: * daemon not running. starting it now on port 5037 * CreateProcess failure, error 2 * failed to start daemon * error: cannot connect to daemon 解决方法: 1.将本机C:\WINDOWS\System32下的adb.exe文件复制到C:\Windows\SysWOW64下。2.将本机C:\WINDOWS\System32下的AdbWinApi.dll文件复制到C:\Windows\SysWOW64下。 解决过程: 第一步: 初一看应该是5037端口被占用了,一个比较常见的错误,于是马上执行命令查看5037端口被谁占用了: netstat -ano | finder "5037" 但是神奇的事情发生了,结果是没有任何程序占用该端口。 第二步: 于是执行adb kill-server ,OK,再执行adb start-server,又提示相同的错误了,adb无法在5037端口启动。 第三步: 执行一下adb nodaemon server命令看看什么情况,这是一个比较有用的命令,一般情况下它会告诉我们哪里出问题了 adb nodaemon server 不幸的是仍然没有提示任何错误 第四步: 检查环境变量配置,没有错误 第五步: 基本排除adb本身的错误,开始定位CreateProcess failure, error 2 这个错误,查到了错误代码: windows error code 2 means: 2 The system cannot find the file specified. ERROR_FILE_NOT_FOUNDand from the source code this is after a call to CreateProcess() and the file name is given by GetModuleFileName() 已经查证过不是环境配置的问题,所以定位为系统无法启动该文件。 第六步: 进入C:\WINDOWS\System32目录,检查adb相关文件。都是正确的。 第七步: 复制\System32目录下的adb.exe文件到C:\WINDOWS\SysWOW64 ,再次执行adb devices命令,提示缺失AdbWinApi.dll文件 再将\System32目录下的AdbWinApi.dll文件copy到C:\WINDOWS\SysWOW64,执行adb devices命令成功。 问题扩展: 1.32位系统 AdbWinApi.dll文件的说明如下: If that doesn't work, you will have to extract the .dll to your system directory. By default, this is: C:\Windows\System (Windows 95/98/Me) C:\WINNT\System32 (Windows NT/2000) C:\Windows\System32 (Windows XP, Vista, 7, win 8) If you use a 64-bit version of Windows, you should also place the .dll in C:\Windows\SysWOW64\ 所以32位系统应该不需要执行步骤2即可解决,有待验证。----------------------------------------------------------------- |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |