Android启动react native服务报错:Ensure that the packager server is running
来源:互联网 发布:手机签字软件 编辑:程序博客网 时间:2024/05/19 22:01
有用点赞,没用请踩。
在react native中使用命令react-native run-android 启动是正常的,但是在AS中直接启动却一直报这个错,原来是自己对于两种启动方式没了解清楚:
react-native run-android 启动项目的时候,会自动启动一个JS服务器,相当于中间服务器的作用,虚拟机的项目连接的就是这个。然而在AS中直接点击运行并不会启动这个服务,需要自己手动启动,在react native项目中运行react-native start 先启动这个服务,另外 Ctrl+m 打开 DEV menue 点击Dev setting ---》Debug server host & port for device,设置好自己电脑的ip和端口,端口默认是8081.
另外电脑使用代理科学上网的要注意了:ip可能会随时变的,所以会报一个CHR...not registrat 具体拼写忘记了,类似的一个错误,启动的时候先把代理关闭然后再启动就行了。
阅读全文
0 0
- Android启动react native服务报错:Ensure that the packager server is running
- eclipse 启动报错 Ensure that the org.eclipse.core.runtime bundle is resolved
- eclipse启动报错 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the
- Android开发——报错Please ensure that adb is correctly located at
- Please check the configured value for ha.zookeeper.quorum and ensure that ZooKeeper is running.
- erdas9.2服务启动失败,lmtools报错“lmgrd is not running: Cannot connect to license server”
- react native 更新后packager启动失败:SyntaxError: Unexpected token ...
- 后台报错:Ensure that you are running Domino with a valid license file
- zabbix server 报错 zabbix server is not running: the information displayed may not be current
- angular4启动报错信息InvalidConfigError: Parsing angular-cli.json failed. Ensure the file is valid JSON
- 报错:This generally means that another instance of this process was already running or is hung in the
- Eclipse报错 Please ensure that adb is correctly located at '.\adb.exe' and can be
- VNC启动报错A VNC server is already running as :10
- zabbix监控报错zabbix server is not running: the information displayed may not be current
- 启动VMware出现报错:The VMware Authorization Service is not running
- 启动VMware出现报错:The VMware Authorization Service is not running
- 启动VMware出现报错:The VMware Authorization Service is not running
- 启动VMware出现报错:The VMware Authorization Service is not running
- 图解Elasticsearch中的_source、_all、store和index属性
- HDU6103
- PHP易混淆知识点大分享
- http 协议下的第三种下载方法
- 算法学习1 求两个数的和
- Android启动react native服务报错:Ensure that the packager server is running
- Dlib学习笔记:dlib array2d与 OpenCV Mat互转
- Android知识体系梳理笔记三:动态代理模式---插件加载机制学习笔记
- C++内存分配(operator new)
- windows命令行切换盘目录
- Cassandra部署与安装
- CentOS7关闭防火墙方法
- 博客网站项目的开发
- SVN更新或提交时出现冲突该如何解决