【问题标题】:RN version 0.55.2 appear "React Native version mismatch"RN 0.55.2版本出现“React Native version mismatch”
【发布时间】:2018-04-17 17:02:12
【问题描述】:

this is error pic

我想将 react native 集成到现有应用中。我已经通过https://facebook.github.io/react-native/docs/integration-with-existing-apps.html 做了任何事情,但是当我使用 Xcode 运行本机应用程序时,结果是

[错误][tid:com.facebook.react.JavaScript] React Native 版本不匹配。

我尝试用 google 解决它,但我做不到!

环境:

leecodeMacBook-Pro-5:MyApp wj$ react-native info
    Scanning folders for symlinks in /Users/wj/workspace/demo/MyApp/node_modules (10ms)
    OS: macOS High Sierra 10.13.3
Node: 9.11.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ^0.55.2 => 0.55.2

【问题讨论】:

  • 您的打包程序可能会在捆绑时为另一个应用程序打开

标签: react-native


【解决方案1】:

如果您尝试升级您的 RN,您是否遵循了更新指南? https://facebook.github.io/react-native/docs/upgrading.html

如果你这样做了,但仍然看到错误

您是否尝试清除缓存?

https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d

【讨论】:

  • 我知道原因。我们组的人提供的 main.jsbundle 版本为 0.54.2,而 0.55.2 是我的原生环境,所以当我运行项目时出现错误。安装0.54.2版本就可以了
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-06-28
  • 1970-01-01
  • 1970-01-01
  • 2017-12-11
  • 1970-01-01
  • 2022-12-02
相关资源
最近更新 更多