react-native 运行android项目的时候运行成功但是模拟器上会提示:

Could not get BatchedBridge, make sure your bundle is packaged correctly 这个错误,到时不能正常运行。


在百度上搜索了这两篇文章

http://blog.csdn.net/b992379702b/article/details/52234479

http://blog.csdn.net/ssksuke/article/details/52403754?locationNum=6%E3%80%81

按照这两篇文章的执行思路去执行,会出现一个问题。就是提示error: option '--entry-file' missing。(不过这两篇文章的擦考意义比较大,要不是参考这两篇文章我不会那么快找到解决方法,还是非常感谢这两位同学提供的方案)

解决方法:

最后在github上了这一篇文章,运行给出的命令。android-react-native项目就能成功运行了。

http://stackoverflow.com/questions/38870710/error-could-not-get-batchedbridge-make-sure-your-bundle-is-packaged-properly/38874952

切换到项目根目录下执行如下命令:

react-native start > /dev/null 2>&1 & curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

执行命令的代码如下图所示

Could not get BatchedBridge, make sure your bundle is packaged correctly的更多相关文章

  1. React-Native:解决真机调试时候Could not get BatchedBridge, make sure your bundle is packaged properly

    问题一:用真机通过USB连接电脑调试的时候报如下错:Could not get BatchedBridge, make sure your bundle is packaged properly,如图 ...

  2. 【React Native错误集】Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

    问题1:Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start ...

  3. 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 - ...

  4. 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 ...

  5. react native初步常见问题

    首先按照资料一步步搭建环境运行,然后成功了,很激动,可是,安卓就是没这么容易成功,还是太年轻了 could not get batchedbridge, make sure your bundle i ...

  6. React Native之坑总结(持续更新)

    React Native之坑总结(持续更新) Genymotion安装与启动 之前我用的是蓝叠(BlueStack)模拟器,跑RN程序也遇到了一些问题,都通过搜索引擎解决了,不过没有记录. 但是Blu ...

  7. React-Native集成到已有项目中的总结

    安装Python 从官网下载并安装python 2.7.x(3.x版本不行) 安装node.js 从官网下载node.js的官方V6.X.X版本或更高版本.安装完成后检测是否安装成功:node -v ...

  8. Android原生嵌入React Native

    1.首先集成的项目目录 我使用的是直接按照react-native init Project 的格式来导入的,也就是说,我的Android项目目录是跟node_modules是在一个目录下的. 我们i ...

  9. react-native不是内部或 外部命令,也不是可运行的程序或批处理文件

    1.执行node命令时提示:node不是内部或外部命令,也不是可运行的程序或批处理文件. 原因环境变量没有指向node安装目录 path:C:\Program Files\nodejs\ 2.reac ...

随机推荐

  1. C#与数据库访问技术总结(十五)之 DataAdapter对象代码示例

    DataAdapter对象代码示例 下面的代码将说明如何利用DataAdapter对象填充DataSet对象. private static string strConnect=" data ...

  2. How to use kingshard building a MySQL cluster

    How to use kingshard building a MySQL cluster https://github.com/flike/kingshard/blob/master/doc/Kin ...

  3. Linux安装snmp

    1.yum安装 yum -y install net-snmp* 2.修改配置文件/etc/snmp/snmpd.conf com2sec notConfigUser default public 默 ...

  4. paip.重装系统后firefox火狐收藏夹的恢复

    paip.重装系统后firefox火狐收藏夹的恢复 1.使用procmon跟踪ff保存收藏时候的读写文件.. D:\Users\attilax\AppData\Roaming\Mozilla\Fire ...

  5. Lucene.net入门学习(结合盘古分词)

    Lucene简介 Lucene是apache软件基金会4 jakarta项目组的一个子项目,是一个开放源代码的全文检索引擎工具包,即它不是一个完整的全文检索引擎,而是一个全文检索引擎的架构,提供了完整 ...

  6. bzoj 1207: [HNOI2004]打鼹鼠

    1207: [HNOI2004]打鼹鼠 Time Limit: 10 Sec  Memory Limit: 162 MB Description 鼹鼠是一种很喜欢挖洞的动物,但每过一定的时间,它还是喜 ...

  7. git stash恢复

    今天下午在使用Git命令进行代码管理时,因为自己一时疏忽直接把自己一天的劳动成果给弄丢了,这还了得,吓死宝宝了.真的,相信有代码丢失的朋友肯定能体会我当时的心情,不能体会我心情的那就祝你们也丢次代码, ...

  8. 推荐几款API文档集合工具

    https://zealdocs.org/    开源.免费,支持Linux.Windows http://velocity.silverlakesoftware.com/  https://kape ...

  9. spring 4.2.0后jdbcTemplate中不用queryForLong了(之系统升级发现)

    在spring 3.2.2之后,jdbcTemplate.queryForInt已经被取消了! 原来是这样写的: String sql = "SELECT count(*) FROM USE ...

  10. (转)create table #temptable 临时表 和 declare @bianliang table ()表变量

    在开发过程中,经常会遇到使用表变量和本地临时表的情况.下面是对二者的一个介绍: 1. 为什么要使用表变量 表变量是从2000开始引入的,微软认为与本地临时表相比,表变量具有如下优点:  a.与其他变量 ...