React Native Expo 弹出后出现问题:'RCTAsyncLocalStorage' 没有可见的@interface 声明选择器 'initWithStorageDirectory:'

Issue after react native expo eject: No visible @interface for 'RCTAsyncLocalStorage' declares the selector 'initWithStorageDirectory:'

我刚刚退出 expo,一切顺利,但我在 Xcode 中尝试 运行 我的 ios 应用程序时遇到以下错误:

No visible @interface for 'RCTAsyncLocalStorage' declares the selector 'initWithStorageDirectory:'

这是我的一部分 package.json

"dependencies": {
"axios": "^0.17.1",
"expo": "^23.0.6",
"lodash": "^4.17.4",
"moment": "^2.20.1",
"react": "16.0.0",
"react-native": "0.50.3",
"react-native-cloudinary": "^1.0.1",
"react-native-communications": "^2.2.1",
"react-native-elements": "^0.18.5",
"react-native-fetch-blob": "^0.10.8",
"react-native-gifted-chat": "^0.3.0",
"react-native-image-picker": "^0.26.7",
"react-native-image-to-base64": "^0.1.0",
"react-native-modal-datetime-picker": "^4.13.0",
"react-native-router-flux": "^4.0.0-beta.24",
"react-navigation": "^1.0.0-beta.22",
"redux-thunk": "^2.2.0"
}

我确实设法修复了它,方法如下:

我将 "react-native" 依赖项更新为最新可用的依赖项: “https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz

我使用 npm uninstall --save 命令删除了我在之前的 expo 应用程序中错误安装的所有依赖项,这些应用程序实际上需要 react-native link: react-native-image-to-base64,react-native-cloudinary

然后我还必须将它们从“常规”>“链接的框架和库”中删除 现在可以了!我现在在使用 Facebook 登录时遇到问题,但至少它不会让我的应用程序崩溃。

祝你好运。

我真的很愚蠢,因为没有早点意识到这一点,但是当我用不同的 Expo 版本切换分支后忘记 运行 yarn 时,我遇到了这个问题。

希望这能为其他人节省一些调试时间。