加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native 学习中遇到的问题记录

发布时间:2020-12-15 07:21:20 所属栏目:百科 来源:网络整理
导读:Android4.4系统,在开发调试时出现 adb -s 7SLZIROZLB95MZTW reverse tcp:8081 tcp:8081error: closed 不用担心,在正式发布后Android4.4系统是可以运行的,建议在测试开发的时候使用Android5.0以上系统 Could not get BatchedBridge 红屏问题"Could not get
  • Android4.4系统,在开发调试时出现
adb -s 7SLZIROZLB95MZTW reverse tcp:8081 tcp:8081

error: closed

不用担心,在正式发布后Android4.4系统是可以运行的,建议在测试开发的时候使用Android5.0以上系统

  • Could not get BatchedBridge

红屏问题"Could not get BatchedBridge,make sure your bundle is packaged correctly"

解决方法: 手动执行命令:

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/

正常执行完assets目录中会多出几个文件,即可解决这个问题。

如果没有assets目录,手动添加下,再执行上述命令

  • could not connetc development server

这个是由于本地server没有启动,一般在运行react-native run-android / run-ios 时会自动启动

如果没有启动,我们可以执行 react-native start 即可,app reload

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读