Please ensure that adb is correctly located at '\sdk\platform-tools\adb.exe' and can be
2016-06-29 16:02
801 查看
遇到问题描述:
运行Android程序控制台输出[2016-06-18 16:18:26 - ] The connection to adb is down, and a severe error has occured.
[2016-06-18 16:18:26 - ] You must restart adb and Eclipse.
[2016-06-18 16:18:26 - ] Please ensure that adb is correctly located at 'D:\Java\sdk\platform-tools\adb.exe'
and can be executed.
解决问题:
1)百度google思路:1.原因adb.exe没有执行。找到adb.exe存放的地方(一般出现这个错误的时候,现在会提示adb.exe的路径),双击adb.exe让他运行就行了。2.adb.exe已经执行。重启:使用命令行。开始---运行---输入cmd,使用cmd命令行,然后在命令行中进入adb.exe所存放的路径,然后输入adb kill-server,点击Enter键,然后再输入adb start-server,点击Enter键,如果下面提示daemonstarted successfully,则表示adb.exe已经运行了,现在可以使用android 模拟器来运行你的程序了;
2)但我任务管理器就没有adb ,猜测是某个程序占用了adb端口。于是按此思路查找。
5037为adb默认端口 查看该端口情况如下
netstat -aon|findstr "5037"TCP 127.0.0.1:5037
0.0.0.0:0 LISTENING 6540
发现6540占用了 5037端口,继续查看6540的task,发现是adb.如下所示
tasklist|findstr "6540"
adb.exe 6540 Console 1 4,276 K
接下来问题就好解决了,在任务管理器kill掉adb.exe ,运行android程序,ok .
3)如果还没有解决问题,那么重启计算机。
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories