【发布时间】:2015-12-10 12:44:20
【问题描述】:
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 应用程序并尝试运行但它给出了相同的 错误 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 这意味着如何解决它。你能帮帮我吗?
【问题讨论】: