React native with Genymontion throwing concurrent Exception

独自空忆成欢 提交于 2020-01-03 11:33:07

问题


I have basic react native application and trying to run in Genymon. At moment I'm getting error

java.util.concurrent.ExecutionException: java.lang.RuntimeException:: ReferenceError: Can't find variable: require(http://10.0.3.2:8081/index.android.bundle?platform=android&dev-true

I working on Mac with El capitan with all configuration suggested by Facebook for android dep,

I running compilation:

../node_modules/react-native-cli/index.js run-android


回答1:


I am seeing this problem too. Tried running react-native run-android




回答2:


I sorted problem. I thought problem was Genymontion but seems like there is simple explanation to forward port for android before starting react-native app

adb reverse tcp:8081 tcp:8081



回答3:


Go to Dev Setting.

Go to Debug server host & port for device.

Type this IP address and port ==> 0.0.0.0:8081

Reload js.




回答4:


I met same issue, please try to remove 'use strict'; in your javascript file, it should be ok.



来源:https://stackoverflow.com/questions/36133563/react-native-with-genymontion-throwing-concurrent-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!