解决React Native unable to load script from assets index.android.bundle on windows
React Native运行的时候,经常碰到React Native unable to load script from assets index.android.bundle on windows解决方法有2种:
方法一:设置IP和端口
具体步骤:报错页面晃动手机,显示菜单 =》 点击Dev Settings =》 点击Debug server host & port for device =》 设置IP和端口(ex:192.168.0.20:8081)=》 点击返回 =》 页面是空白,再次点击摇一摇,选择Reload JS程序就显示出来了。
如果这种方法还是不行继续往下看。
方法二:原因没有找到assets下文件,需要手动创建并设置
1.首先手动在main下建立一个assets文件夹
2.然后cmd 进入项目的根目录下执行:
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
3.在执行 react-native run-android;
到这就结束了,基本这2个方法就可以解决React Native unable to load script from assets 了。
解决React Native unable to load script from assets index.android.bundle on windows的更多相关文章
- React Native: unable to load scripts from assets 'index.android.bundle' on real device
问题:重新建了一个项目后,运行react-native run-android报: unable to load scripts from assets 'index.android.bundle' ...
- react native中Unable to load script from assets 'index.android.bundle'解决方案
刚刚朋友问我,说是创建好一个项目,运行后报错:Unable to load script from assets 'index.android.bundle',以前好好的没出现这种现象,于是我找到一个 ...
- 项目初始化以后出现:Unable to load script from assets 'index.android.bundle
Mac中真机测试React Native project时出现Unable to load script from assets 'index.android.bundle' 2018年01月21日 ...
- unable to load script from assets 'index.android bundle'
在Android手机上运行React-native项目时 报错:unable to load script from assets 'index.android bundle' ,make sure ...
- Unable to load script from assets 'index.android.bundle' 出错?
野路子太多,坑人真的!F**k 言归正传,当你运行 react native 程序的时候出现这个错误 ,如果您使用Windows,请按以下方式运行命令,或者如果出现错误“无法找到条目文件index.a ...
- Unable to load script from assets 'index.android.bundle'.make sure you bundle is packaged correctly
解决此问题 以下方法每次都需要执行命令2才能更新 1.创建assets目录 mkdir android/app/src/main/assets 2.执行命令 react-native bundle - ...
- Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you're running a packager server
curl -k 'http://localhost:8081/index.android.bundle?platform=android' > android/app/src/main/asse ...
- React Native踩坑之Unable to load script from assets
报错: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged corr ...
- react-native 新手爬坑经历(unable to load script from assets 和could not connect to development server.)
按照https://reactnative.cn/docs/0.51/getting-started.html教程新建的项目 react-native init AwesomeProject cd A ...
随机推荐
- APUE-文件和目录(三)函数chown 和lchown
下面的几个chown函数可用于更改文件的用户ID和组ID.如果两个参数owner或group中的任意一个是-1,则对应的ID不变. #include<unistd.h> int chown ...
- 【MyBatis源码分析】select源码分析及小结
示例代码 之前的文章说过,对于MyBatis来说insert.update.delete是一组的,因为对于MyBatis来说它们都是update:select是一组的,因为对于MyBatis来说它就是 ...
- Ceph Object Gateway Admin api 获取用户列表问题
按照官方文档使用Admin Ops API 获取用户列表 GET /admin/user时 返回{code: 403, message: Forbidden}这里有两个问题:首先用户列表的请求为 如下 ...
- SQL储存过程
基本语法 创建存储过程 create procedure sp_name @[参数名] [类型],@[参数名] [类型] as begin ......... end 以上格式还可以简写成: crea ...
- [转]Java多线程学习(吐血超详细总结)
转自:http://www.mamicode.com/info-detail-517008.html 本文主要讲了Java中多线程的使用方法.线程同步.线程数据传递.线程状态及相应的一些线程函数用法. ...
- springmvc 之 返回值
springMVC对于controller处理方法返回值的可选类型 spring mvc 支持如下的返回方式:ModelAndView, Model, ModelMap, Map,View, Stri ...
- ViewPager实现无限轮播踩坑记
最近笔者想通过ViewPager来实现一个广告Banner,并实现无限轮播的效果,但是在这个过程中踩了不少的坑,听我慢慢道来.如果大家有遇到和我一样的情况,可以参考我的解决方法,没有那就更好,如果针对 ...
- .htaccess伪静态(URL重写)绑定域名到子目录实现子站点
Apache主机一般支持.htaccess伪静态,即可以实现绑定域名到子目录.一个空间多个站点. 应用举例:绑定htaccess.800m.net到htaccess目录 根目录下.htaccess内容 ...
- Django 模型和数据库 总结
模型和数据库 模型 首先我们在创建一个model的时候,这个类都是继承自 django.db.models.Model, 各种Model Field类型 AutoField,自动增长的IntegerF ...
- SQL检测开始日期 结束日期 是否存在交叉
检测开始日期 结束日期 是否存在交叉 "+tj+" and ((starttime>="+starttime+" and starttime<=&q ...