Could not get BatchedBridge, make sure your bundle is packaged correctly

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

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


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

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

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

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

 

解决方法:curl

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

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

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

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"

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

相关文章
相关标签/搜索