react-native报错 code:500

2,012 阅读1分钟

报错 code:500

    The development server returned response error code: 500URL: http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=falseBody:{"type":"InternalError","errors":[],"message":"Metro Bundler has encountered an internal error, please check your terminal error output for more details"}processBundleResult BundleDownloader.java:242...........

先执行

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

再执行

rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json

然后运行

npm i && react-native run-android