Unable to load script.Make sure you're either running a metro server (run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release.
我本身这里报错缘由是没有找到index.android.bundle。react
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
参考文档:https://stackoverflow.com/que...android
修改 项目目录/android/app/build.gradle里
主要是设置bundleInDebug等于true,使得开发时也会打包index.android.bundle。
参考文档:https://github.com/facebook/r...git