Eclipse在运行android程序时出现以下错误...
错误1:
[2015-12-10 16:10:37 - adb] Cannot open 'nul': The system cannot find the file specified. (2)
[2015-12-10 16:10:37 - ddms] 'D:\android-sdk-windows\platform-tools\adb.exe,start-server' failed -- run manually if necessary
[2015-12-10 16:10:37 - adb] * failed to start daemon *
[2015-12-10 16:10:37 - adb] error: cannot connect to daemon
当我从命令行开始时,我收到此错误...
错误2:
D:\android-sdk-windows\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
Cannot open 'nul': The system cannot find the file specified. (2)
* failed to start daemon *
error: cannot connect to daemon
以前,当我双击它时,即使AVD Manager.exe
和SDK manager.exe
也没有打开。在谷歌上做Rnd之后我发现了这篇帖子Android SDK manager won't open,我对android.bat做了如下修改:
我替换了这个
rem Check we have a valid Java.exe in the path.
set java_exe=
call lib\find_java.bat
if not defined java_exe goto :EOF
使用此代码
set java_exe=C:\Program Files\Java\jdk1.7.0_75\bin\java.exe
现在,当我双击AVD Manager.exe
和SDK manager.exe
时,它会打开。
我还检查了新的eclipse(Mars)并添加了ADT插件并创建了Hello World Application并尝试运行但是它给出了相同的错误1
更新2:
我得到以下错误..
D:\>set ADB_TRACE=adb
D:\>adb start-server
adb I 6072 2636 adb.cpp:219] Android Debug Bridge version 1.0.32
adb I 6072 2636 adb.cpp:219] Revision 09a0d98bebce-android
adb I 6072 2636 adb.cpp:219]
adb I 6072 2636 adb_client.cpp:126] _adb_connect: host:version
adb I 6072 2636 sysdeps_win32.cpp:742] could not connect to tcp:5037: cannot c
onnect to 127.0.0.1:5037: No connection could be made because the target machine
actively refused it. (10061)
adb I 6072 2636 adb_client.cpp:175] adb_connect: service host:start-server
* daemon not running. starting it now on port 5037 *
Cannot open 'nul': The system cannot find the file specified. (2)
* failed to start daemon *
error: cannot connect to daemon
我检查了端口5037是否被其他程序使用但是没有显示
netstat -aon|findstr 5037
究竟什么是错误..系统拒绝连接端口5037这是什么意思解决它。你能帮我吗?
答案 0 :(得分:1)
这是很晚的回答,我怀疑你几乎忘了它,但它会帮助其他人面对这个问题 由于您收到此错误:
Cannot open 'nul': The system cannot find the file specified. (2)
* failed to start daemon *
error: cannot connect to daemon
问题出在ADB.exe
可执行文件中,可能已损坏或有权限或所有权问题。
如果只是权限问题,您可以通过复制(来自" D:\ android-sdk-windows \ platform-tools \" )进行检查:
ADB.exe
AdbWinApi.dll
AdbWinUsbApi.dll
将其放在桌面的新文件夹中并在该目录中运行adb.exe devices
(按住 Shift 并右键单击目录中任何位于文件中的位置并在此处打开命令窗口)。
如果你看到这个你很好:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
如果再次失败,则它已损坏,您必须更换整个3个文件 从这里下载adbshell.com