没有使用反应原生的世博二叉

Sih*_*ine 34 react-native expo

我正在使用世界上的反应世界.一切都很好,但我得到这个警告,应用程序需要很长时间加载:

  [exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
Run Code Online (Sandbox Code Playgroud)

我该怎么办呢.

kim*_*mat 36

如果使用来自入门页面的命令创建react native应用程序:$create-react-native-app AwesomeProject则package.json文件具有以下依赖项:

"dependencies": {
  "expo": "^20.0.0",
  "react": "16.0.0-alpha.12",
  "react-native": "^0.47.0"
}
Run Code Online (Sandbox Code Playgroud)

如果您直接在Expo XDE中创建应用程序,您将在package.json中看到,它们使用的是react-native的分支:

"dependencies": {
  "expo": "^20.0.0",
  "react": "16.0.0-alpha.12",
  "react-native": "https://github.com/expo/react-native/archive/sdk-20.0.0.tar.gz"
},
Run Code Online (Sandbox Code Playgroud)

将react-native模块路径更改为https://github.com/expo/react-native/archive/sdk-20.0.0.tar.gz并运行npm install将解决问题.

  • 按照升级说明获取最新版本(v21 now)的正确依赖项:https://docs.expo.io/versions/latest/guides/upgrading-expo.html (6认同)
  • 你可以在这里找到最新的版本号:https://docs.expo.io/versions/latest/guides/upgrading-expo.html (5认同)