React native with Genymontion throwing concurrent

2019-06-21 02:54发布

问题:

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.