【发布时间】:2018-07-20 06:26:02
【问题描述】:
每当我在 react native 中创建和运行示例应用程序时,我都会收到此错误“无法从资产 index.android.bundle 加载脚本”。所以我尝试了这个解决方案
1.mkdir assets 与 android/app/src/main
2.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
3.react-native run-android
但收到此错误Plugin 0 specified in "E:\\SampleReact\\node_modules\\babel-preset-react-native\\index.js" provided an invalid property of "default" (While processing preset: "E:\\SampleReact\\node_modules\\babel-preset-react-native\\index.js")。在此之前,我收到错误无法在 react-native 中找到 Accessibility info,因此我将 RN 版本从 0.56 降级为 0.55.4。然后我尝试但收到上述错误。卡住了。请帮忙。问题是我刚刚安装了 Windows 10,所以我需要从一开始就安装所有依赖项(节点、android studio、react-native、java sdk 等)。所以请帮忙。
【问题讨论】:
标签: javascript android reactjs react-native