升级到React Native 0.60后出现此错误.
我曾try 按照错误消息中的建议,使用react-native unlink <dependency>
手动取消每个手动链接的依赖项的链接,但问题仍然存在.
错误消息如下:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-admob (to unlink run: "react-native unlink react-native-admob")
- react-native-facebook-account-kit (to unlink run: "react-native unlink react-native-facebook-account-kit")
- react-native-fbsdk (to unlink run: "react-native unlink react-native-fbsdk")
- react-native-gesture-handler (to unlink run: "react-native unlink react-native-gesture-handler")
- react-native-linear-gradient (to unlink run: "react-native unlink react-native-linear-gradient")
- react-native-localization (to unlink run: "react-native unlink react-native-localization")
- react-native-restart (to unlink run: "react-native unlink react-native-restart")
- react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
- react-native-webview (to unlink run: "react-native unlink react-native-webview")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md