如何修改IP&安培;端口使用反应,原生的Android? [英] How to modify IP & port use react-native Android?
问题描述
我用了反应,原生的Android演示项目AwesomeProject,运行反应本地运行的Android启动网络服务器和安装Android APK。默认的Web服务器配置为localhost:8081,我怎么能修改Web服务器端口,以及如何更新记录IP&放大器;港口在Android项目
I used the react-native Android demo project AwesomeProject, run react-native run-android to start webserver and install Android APK. The default webserver configuration is localhost:8081, how can I modify the webserver port, and how to update recording ip&port in Android project.
我刚刚发现,可以修改Android的调试设置IP地址,似乎getDebugServerHost是一个私有API,实不提供任何API更改IP&放大器;端口
I just found that can modify ip address in Android debug setting, it seems "getDebugServerHost" is a private API, does Facebook provide any API to change ip&port.
推荐答案
不幸的是,港口目前(2015年9月23日)硬盘codeD。我相信,这将及时更换,因为它已经从高位贡献者,项目提出的问题。
https://github.com/facebook/react-native/issues/2704
Unfortunately, the port is currently (2015/09/23) hardcoded. I believe this will be changed in time as it already has an Issue raised from a high level contributor to the project. https://github.com/facebook/react-native/issues/2704
这篇关于如何修改IP&安培;端口使用反应,原生的Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!