We need to be able to debug this application.
Now we should be able to see "Welcome to React Native!" message.īut we are not finished. But before running this make sure that GenyMotion is running a virtual Android image. adb shell settings put global verifier_verify_adb_installs 0Īdb shell settings put global package_verifier_enable 0 If still fails with error code INSTALL_FAILED_VERIFICATION_FAILURE, run below that allows adb to install apps from unknown resources. For me it was like below: export ANDROID_HOME=/Users/cuneytaliustaoglu/Library/Android/sdk Find your Android SDK location and save it in environment variables. If this fails, probably your ANDROID_HOME variable is not set. Create this empty folder so when you run the script it will fail creating the file "" under this folder. Because by default '/assets' folder under 'android/app/src/main' does not exist. If you run any of those scripts, it will fail. "postinstall": "rndebugger-open -port 8081" "bundle-ios": "react-native bundle -dev false -entry-file index.js -bundle-output ios/main.jsbundle -platform ios", "bundle-android": "react-native bundle -platform android -dev false -entry-file index.js -bundle-output android/app/src/main/assets/ -assets-dest android/app/src/main/res & react-native run-android", Now create a new project using: react-native init my-rn-project If you don't want to hassle with GenyMotion, you can always use the free, official emulator from Android Studio. I've added Google Pixel 2 on Android 8.0. Then add a virtual device using the plus button. Genymotion is free for personal projects but you need to purchase a subscription for commercial projects. You need to create a personal account and login. There are other alternatives or you can use your Android device directly but it's faster to use an emulator. Note that we install "react-native-cli" but use the command "react-native". Here's a complete guide on how to set up a React Native application and enable debugging. Debugging in React Native is not straightforward.