我在genymotions运行反应原生android,当我打开JS调试,Chrome操作http://10.0.3.2:8081/debugger-ui而不是http://localhost:8081/debugger-ui/,所以genymotion日志无法连接调试,为什么呢?怎么解决?
我们来解决你的问题。请按以下步骤操作:
Ctrl + M
打开Dev菜单,然后点击Dev Settings
Debug server host & port for device
127.0.0.1:8081
或只是localhost:8081
,现在重新加载应用程序。您现在可以进行调试了。PS:有些教程可能会建议您安装Chrome扩展以允许CORS,但不需要它。上述方法更简单。