我正在尝试打开 React Native 应用程序,但我遇到了这个问题 解决方案是什么?

I am trying to open the React Native application but I have this problem What is the solution?

$ react-native run-android
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  - @react-native-community/geolocation (to unlink run: "react-native unlink @react-native-community/geolocation")
  - react-native-bluetooth-status (to unlink run: "react-native unlink react-native-bluetooth-status")
  - react-native-device-info (to unlink run: "react-native unlink react-native-device-info")
  - react-native-i18n (to unlink run: "react-native unlink react-native-i18n")
  - react-native-image-picker (to unlink run: "react-native unlink react-native-image-picker")
  - react-native-ux-cam (to unlink run: "react-native unlink react-native-ux-cam")
  - react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")

将 React Native 从 0.60 以下升级到 0.60 或更高版本时可能会发生这种情况。今后,您可以通过 "react-native unlink " 取消链接此依赖项,它将自动包含在您的应用程序中。如果库与自动链接不兼容,请忽略此消息并通知库维护者。 阅读有关自动链接的更多信息:https://github.com/react-native-community/cli/blob/master/docs/autolinking.md info 运行 jetifier 将库迁移到 AndroidX。您可以使用“--no-jetifier”标志禁用它。 Jetifier 找到了 1225 个要转发 Jetify 的文件。使用4名工人... 信息 JS 服务器已经 运行。 信息正在安装应用程序... 启动 Gradle 守护进程,无法重用 1 个不兼容的守护进程,使用 --status 获取详细信息

失败:构建失败,出现异常。

我在上一个项目中遇到了同样的问题, 您可以尝试使用此命令取消link:react-native unlink 并删除所有依赖项:yarn remove 或 npm-uninstall 然后删除 yarn.lock 、 package-lock.json 和 npm-package-lock.json

并删除文件夹'Android'中的"build"文件夹, 然后你可以用 yarn install 或 npm-install 重新安装, 并尝试 react-native 运行-android,

我个人创建了一个新项目并重新安装了所有没有 react-native 的 depedencies link,因为这个错误是一个配置问题并且出现在新版本的 React Native 中,

希望对您有所帮助

只需删除构建文件夹,然后重试。