react-native爬坑之旅-unable to load script from assets'index.android.bundle'.Make sure your bundle is pa
2018-01-25 11:01
609 查看
react-native run-android执行虚拟机红屏
提示:unable to load script from assets'index.android.bundle'.Make sure your bundle is packaged correctly or your're running apackager server.
看提示是无法加载资源文件中的script文件,解决办法就是去项目中的android->app->src->main文件夹中新建一个assets文件
然后在项目根目录运行如下代码:
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/
以上是网上的资料,
其实新版的react-native在根目录下面还缺少一个文件,就是index.android.js文件
解决:复制index.js,更新名字为index.android.js
然后我们执行上面网上的资料(建assets文件夹,根目录执行代码)
提示:unable to load script from assets'index.android.bundle'.Make sure your bundle is packaged correctly or your're running apackager server.
看提示是无法加载资源文件中的script文件,解决办法就是去项目中的android->app->src->main文件夹中新建一个assets文件
然后在项目根目录运行如下代码:
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/
以上是网上的资料,
其实新版的react-native在根目录下面还缺少一个文件,就是index.android.js文件
解决:复制index.js,更新名字为index.android.js
然后我们执行上面网上的资料(建assets文件夹,根目录执行代码)
相关文章推荐
- unable to load script from assets 'index.android bundle' ,make sure your bundle is packaged correct
- Mac中真机测试React Native project时出现Unable to load script from assets 'index.android.bundle'
- 解决React Native unable to load script from assets index.android.bundle on windows
- 解决React Native unable to load script from assets index.android.bundle on windows
- React Native unable to load script from assets index.android.bundle on windows
- React-Native Android真机测试 -unable to load script from assets 'index.android bundle'...
- react-native 启动的时候报错unable to load script from assets 'index.android bundle'
- react-native---配置reactnative报红,run-Android时候报错unable to load script from assets 'index.android.bundl
- win10 windows10 react-native rn 环境安装配置Unable to load script from assets 'index.android.bundle终极解决方案
- Unable to load script from assets 'index.android.bundle'.解决方案
- react-native 最新版本爬坑经历(unable to load script from assets 和could not connect to development server.)
- 搭建RN环境踩坑(一)Unable to load script from assets ‘index.android bundle’
- unable to load script from assets 'index.android.bundl
- react-native 运行报Could not get BatchedBridge, make sure your bundle is packaged correctly 错误
- React-Native:解决真机调试时候Could not get BatchedBridge, make sure your bundle is packaged properly
- React-native 常见错误:Could not get BatchedBridge, make sure your bundle is packaged correctly
- react native 问题(mac系统) Could not get BatchedBridge, make sure your bundle is packaged correctly 问题解决
- Unity2017 Unable to list target platforms.Please make sure the android sdk path is correct.问题解决!
- Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
- react native中的错误unable to load script..