原本是想跑monkey测试的,可使用adb命令时提示:adb server is out of date. killing...

  出现这个问题的原因是:adb使用的端口5037被占用了。下面我们说下如何找到是哪个程序占用了这个端口,顺便看看cmd里面的一些类似Linux的进程操作。

 

 1.错误信息:

C:\Users\admin>adb shell monkey -help
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error: unknown host service

2. 原因:

adb的端口(5037)被占用了。至于这个5037端口,可以参考本博客另外 一篇文章:

http://blog.csdn.net/liranke/article/details/4999210

在这个文章里,详细说明了adb的原理及其源码分析。

3. 解决办法:

(1)查看adb的端口号是多少: adb nodaemon server

C:\Users\admin>adb nodaemon server
cannot bind 'tcp:5037'

提示:无法绑定5037端口

(2)查找5037端口占用的进程 :netstat -ano | findstr "5037"

C:\Users\admin>netstat -ano | findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING
TCP 127.0.0.1:5037 127.0.0.1:53437 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:53440 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:53445 TIME_WAIT 0

(3)找到占用端口进程对应的应用程序 :tasklist | findstr "10760"

C:\Users\admin>tasklist | findstr "10760"
PPAdbServer.exe 10760 Console 1 6,044 K

(4)此时有2个方法杀死进程:

  方法1,通过任务管理器,进程中找到PPAdbServer.exe ,结束进程即可。此方法省事高效。

  如果想多学习CMD命令,可以用下面方法

  方法2:taskkill /f /pid 10760

  C:\Users\admin>taskkill /f /pid 10760

  成功: 已终止 PID 为 10760 的进程。

4. 重现启动adb

C:\Users\admin>adb shell monkey -help
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
[-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
[--ignore-crashes] [--ignore-timeouts]
[--ignore-security-exceptions]
[--monitor-native-crashes] [--ignore-native-crashes]
[--kill-process-after-error] [--hprof]

参考文档:https://blog.csdn.net/liranke/article/details/42524851

adb server is out of date. killing完美解决的更多相关文章

  1. 【转】adb server is out of date. killing完美解决

    今天,久未出现的著名的“adb server is out of date.  killing”又发生了,在此,将解决方法记下,以便日后查看. 1. 错误信息: C:\Users\lizy>ad ...

  2. adb server is out of date killing... 的解决办法

    是adb server端口被占用了 你先执行adb nodaemon server ,查看adb server的端口是多少 1 2 C:\Users\xxxx>adb nodaemon serv ...

  3. adb server is out of date.killing的解决办法

    当把手机连接到电脑端口运行adb程序调试时,出现了下面这样的情况: 分析:出错的原因是adb的端口被其他程序的进程占领了,所以要做的就是找到并kill该进程.     工具/原料   cmd.exe. ...

  4. ​adb server is out of date. killing解决方法

    adb server is out of date.  killing完美解决 今天,久未出现的著名的“adb server is out of date.  killing”又发生了,在此,将解决方 ...

  5. Android学习笔记1 android adb启动失败问题 adb server is out of date. killing...

    下面是Android的学习笔记,原文地址. 我是使用adb devices出现如下红字错误, 使用第一种方法方法,结果关掉豌豆荚就可以了. android adb启动失败问题 adb server i ...

  6. Android调试时, "adb devices"命令提示 adb server is out of date. killing...

    C:\Users\xxxx>adb devicesadb server is out of date. killing... 查看端口, 发现被占用 C:\Users\xxxx>adb n ...

  7. “adb server is out of date. killing.... ADB server didn't ACK * failed to start daemon * ”

    草泥马的adb: “adb server is out of date. killing.... ADB server didn't ACK * failed to start daemon * ” ...

  8. adb server is out of date. killing... 解决方案

    忘了原文从哪来的了,过后查到补上链接 今天调试android的时候发现一个诡异的问题 C:\Users\xxxx>adb start-server   adb server is out of ...

  9. adb server is out of date. killing... ADB server didn't ACK * failed to star

    The connection to adb is down, and a severe error has occured. [-- :: - HelloOPone] You must restart ...

随机推荐

  1. numpy.random 常用函数详解之简单随机数篇(Simple random data)

    1.numpy.random.rand(d0,d1,d2,...,dn) 参数:d0,d1,d2,...,dn 须是正整数,用来描述生成随机数组的维度.如(3,2)代表生成3行2列的随机数组. 返回值 ...

  2. [Swift]LeetCode69. x 的平方根 | Sqrt(x)

    Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a no ...

  3. [Swift]LeetCode653. 两数之和 IV - 输入 BST | Two Sum IV - Input is a BST

    Given a Binary Search Tree and a target number, return true if there exist two elements in the BST s ...

  4. [Swift]LeetCode931. 下降路径最小和 | Minimum Falling Path Sum

    Given a square array of integers A, we want the minimum sum of a falling path through A. A falling p ...

  5. [Swift]LeetCode994. 腐烂的橘子 | Rotting Oranges

    In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the ...

  6. iOS学习——图片压缩到指定大小以内

    一.图片压缩简述 在我们开发过程中,有可能会遇到拍照.或者从相册中选择图片,要么单选或者多选,然后上传图片到服务器,一般情况下一张图片可能3-4M,如果类似微信朋友圈上传9张图片大约是 35M左右,如 ...

  7. 说一说MVC的控制器(二)

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  8. Elasticsearch Document

    1.  基本概念回顾 1.1.  Node 节点是一个服务器,它是集群的一部分,存储数据,并参与集群的索引和搜索功能 节点有一个名称标识,该名称在缺省情况下是在启动时分配给节点的随机全局惟一标识符(U ...

  9. Eureka介绍

    1.  Eureka是什么 Eureka是一个基于REST的服务,主要用于AWS云中的定位服务,以实现中间层服务器的负载平衡和故障转移 在 Spring Cloud 微服务架构中通常用作注册中心 我们 ...

  10. 并发编程(十六)——java7 深入并发包 ConcurrentHashMap 源码解析

    以前写过介绍HashMap的文章,文中提到过HashMap在put的时候,插入的元素超过了容量(由负载因子决定)的范围就会触发扩容操作,就是rehash,这个会重新将原数组的内容重新hash到新的扩容 ...