D:\rnworkspace\Hello>react-native run-android

JS server already running.
Running D:\Android\sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:
8081
Building and installing the app on the device (cd android && gradlew.bat install
Debug)...

Installing APK 'app-debug.apk' on 'emulator-5554 - 6.0'
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 39.532 secs
Starting the app on emulator-5554 (D:\Android\sdk/platform-tools/adb -s emulator
-5554 shell am start -n com.hello/.MainActivity)...

error: unknown host service

解决

adb无法使用,提示error:unknown host service的解决办法
http://blog.csdn.net/liguilicsdn/article/details/50902194#comments
 
此时,需要辨别电脑的5037端口被哪个应用程序占用的方法:(使用adb时需要5037端口是空闲的)
如果5037端口被占用,找到他删掉进程OK。

一般是360MobileLink.exe 这个软件。卸载掉360 手机助手即可!
 
方法1 

2.查看指定端口的占用情况
C:\>netstat -aon|findstr "9050"

协议    本地地址                     外部地址               状态                   PID

TCP    127.0.0.1:9050         0.0.0.0:0              LISTENING       2016

P: 看到了吗,端口被进程号为2016的进程占用,继续执行下面命令: (也可以去任务管理器中查看pid对应的进程)

3.查看PID对应的进程
C:\>tasklist|findstr "2016"

映像名称                       PID 会话名              会话#       内存使用
 ========================= ======== ================
  tor.exe                     2016 Console                 0     16,064 K

P:很清楚吧,tor占用了你的端口。

4.结束该进程

C:\>taskkill /f /t /im tor.exe

方法2

端口查看工具CurrPorts  
官方下载地址 http://www.nirsoft.net/utils/cports.html  
中文版下载地址 http://www.jb51.net/softjc/137217.html

react-native run-android error: unknown host service的更多相关文章

  1. adb shell出错“error: unknown host service”

    已经测试,可用: 在命令行输入adb shell后输出如下错误: adb server is out of date.  killing... ADB server didn't ACK * fail ...

  2. 解决adb:error: unknown host service

    1.在使用adb命令跑程序时出现adb: error: failed to get feature set: unknown host service 输入adb shell 时提示error: un ...

  3. error: unknown host service 的详细解决办法

    问题情况描述: 有时候,你在cmd 窗口 adb shell 的时候,出现error: unknown host service. 问题解决办法: 这就要怪可恶的360手机助手了,你在任务管理器里面把 ...

  4. adb无法使用,提示error: unknown host service的解决办法

    此时,需要辨别电脑的5037端口被哪个应用程序占用的方法:(使用adb时需要5037端口是空闲的) 1. 打开命令行,输入命令:netstat -ano |findstr "5037&quo ...

  5. 使用adb报错;error: unknown host service

    用adb往虚拟机Genymotion上安装apk时报错 报这个错误是因为主机端口5037被占用 接下来就要查看5037被哪个应用程序占用,然后结束该程序,才能使用adb 在cmd输入命令netstat ...

  6. adb device出现error:unknown host service

    最近在windows下使用adb device时,提示“ADB server didn't ACK” & “error: unknown host service”错误. 网上搜索了下,是说a ...

  7. adb unknown host service 这个问题的解决,转载

    一直没搞明白这个问题咋出现的,但今天看到一个方法,搞定了!原来是豌豆荚占用了 5037 端口导致. 参见原文章:一个豌豆荚引发的血案——关于ADB server didn't ACK的问题 简单来讲, ...

  8. adb :unknown host service

    adb 没法重启   现象:C:\Users\John>adb shell             adb server is out of date.  killing...          ...

  9. 无法进入adb shell,提示unknown host service的解决办法

    今天monkey的简易环境配置好后,准备开始monkey的压测工作,可是在命令控制窗口中输入无法进入adb shell,提示了错误 "unknown host service"

随机推荐

  1. codeforces水题100道 第八题 Codeforces Round #274 (Div. 2) A. Expression (math)

    题目链接:http://www.codeforces.com/problemset/problem/479/A题意:给你三个数a,b,c,使用+,*,()使得表达式的值最大.C++代码: #inclu ...

  2. Jquery-无法有效获取当前窗口高度

    今天碰到个很奇怪的事情,那就是滚动条往下滚动时候没有触发提示,反而是往上滚动的时候,触发了提示.百思不得其解,尤其是拿了美工大大的切图过来,一点问题都没有. 那么就进行console.log输出查看了 ...

  3. 解决一起web 页面被劫持的案例

    现象 江西客户手机端连接wifi打开URL,页面上显示淘宝店铺广告,使用手机移动网络打开正常,其他地区正常. 二. 处理过程 初步分析:3g.club项目使用了CDN,目前只有江西异常,其他地区无异常 ...

  4. 【软件分析与挖掘】An Empirical Study of Bugs in Build Process

    摘要 对软件构建过程中所产生的错误(build process bugs)进行实证研究. 5个开源项目:CXF, Camel, Felix,Struts, and Tuscany. 把build pr ...

  5. 【Spring Boot && Spring Cloud系列】那些Spring Boot中踩过的坑

    一.不连接数据库启动springboot报错 Cannot determine embedded database driver class for database type NONE 原因:Spr ...

  6. php strpos(), stripos(),strrpos(), strripos()的区别

    strpos(), 左边开始,字符出现第一个位置,区分大小写: stripos(),不区分大小写: strrpos(), 左边开始,字符出现,最后一个位置,区分大小写: strripos()不区分大小 ...

  7. OpenMax概述

    一.OpenMax简介 OpenMAX是一个多媒体应用程序的标准.由NVIDIA公司和Khronos™在2006年推出. 它是无授权费的.跨平台的C语言程序接口序列,这些接口对音频.视频.静态图片的常 ...

  8. [移动] Xamarin install

    It was not possible to complete an automatic installation. This might be due to a problem with your ...

  9. 微信小程序:wx.navigateTo中url无法跳转问题(app.json中配置的tabBar与wx.navigateTo中url引用相同页面导致)

    今天在做微信小程序时,设置wx.navigateTo页面跳转并传参数,点击始终没有效果,代码如下: //事件处理函数 newsDetail: function (event) { console.lo ...

  10. mysql if判断

    select if(SUBSTR('06622200556',1,2)='06',0,1) from t_member_product_adb limit 2 输出结果为:0,0