Unable to load script from assets 'index.android.bundle' 出错?


野路子太多,坑人真的!F**k

言归正传,当你运行 react native 程序的时候出现这个错误 ,如果您使用Windows,请按以下方式运行命令,或者如果出现错误“无法找到条目文件index.android.js”,那么我这一招能救你

第一步(创建缺失的目录):mkdir android\app\src\main\assets
第二步(在创建好的目录添加程序需要的文件):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 第三步:react-native run-android

好了,继续嚼着黄连敲代码吧!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM