第一次写的helloworld,竟让不能通过编译,不能放到Android模拟器中
出现了以下错误The connection to adb is down, and a severe error has occured.等。。
这种情况就是adb的port被占用,5037
首先进入命令行,查看占用5037端口的进程
cmd —— netstat -aon|findstr "5037"会找到另一个进程
如下
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 7244
cmd——netstat -ano | findstr "5037"
此时查找到5037的任务,之后kill掉5037就行了,可以在任务栏中也可以用命令行,
之后再输入netstat -ano | findstr "5037"查看为空就可以了,就可以运行编译了。