I am following guide on starting react.js. http://code.tutsplus.com/tutorials/creating-a-dictionary-app-using-react-native-for-android--cms-24969 I installed node, react, android studio and genymotion emulator. When I get to the part of building app in emulator, I get this error:
error build image
I activated USB debuggin tool. When I try to run adb devices command in command prompt, it gives me nothing.
I would suggest 2 steps (both were required to solve my issue)
Turn off your local firewall. On osx, go to "Security & Privacy" -> "Firewall" -> Click lock icon -> "Turn off Firewall"
The default port 8081 may be in use (even if the lsof
command suggests otherwise). Try another port on start:
react-native start --port=8088
And on your device, shake it to get the dev menu, tap "Dev Settings" -> "Debug server host & port for device" -> enter "XX.XX.XX.XX:8088" (where x's are your local IP)
On Android 9, you will need to add the follwing in application tag of ./android/app/src/debug/AndroidManifest.xml
android:usesCleartextTraffic="true"
https://github.com/facebook/react-native/issues/15388#issuecomment-505187651
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With