启动react-native run-android时出现“无法找到变量:_fbBatchedBridge”的错误

时间:2021-02-14 20:52:39

I created a new react-native project and launch it on iphone simulator successfully. Now I want to launch it on a android simulator which is genymotion on a mac machine. I always got below error on android. I did some search and I can verify that my npm server started and listened on 8081 port. I also set my server ip and port on the simulator by clicking "Dev Settings" -> "Debug server host & port for device". But it is still not working. Is there any other place I need to check? I guess the simulator can't connect to my host machine but I don't know how to configure it.

我创建了一个新的react-native项目并成功在iphone模拟器上启动它。现在我想在一台机器人模拟器上启动它,这是一台mac机器上的genymotion。我在android上总是遇到以下错误。我做了一些搜索,我可以验证我的npm服务器是否启动并在8081端口上进行了监听。我还通过单击“开发设置” - >“调试服务器主机和设备端口”在模拟器上设置我的服务器IP和端口。但它仍然无法正常工作。还有其他我需要检查的地方吗?我猜模拟器无法连接到我的主机,但我不知道如何配置它。

启动react-native run-android时出现“无法找到变量:_fbBatchedBridge”的错误

1 个解决方案

#1


0  

After some testing, I solved this problem by updating genymotion to the latest version then added a android simulator with android 5.0. Previous I was using android 4.3 which is not working.

经过一些测试,我通过更新genymotion到最新版本解决了这个问题,然后添加了android 5.0的android模拟器。以前我使用的是android 4.3,但是没有用。

#1


0  

After some testing, I solved this problem by updating genymotion to the latest version then added a android simulator with android 5.0. Previous I was using android 4.3 which is not working.

经过一些测试,我通过更新genymotion到最新版本解决了这个问题,然后添加了android 5.0的android模拟器。以前我使用的是android 4.3,但是没有用。