运行yarn android ,希望能跑项目,但是遇到以下问题
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
打开链接:https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
是一个医生,帮忙诊断我的项目问题:
@react-native-community/cli-doctor
此包是React Native CLI的一部分。它包含用于诊断和修复常见 Node.js、iOS、Android 和 React Native 问题的命令。
安装
yarn add @react-native-community/cli-doctor
命令
doctor
用法:
npx react-native doctor
诊断并修复常见的 Node.js、iOS、Android 和 React Native 问题。
info
用法:
npx react-native info
获取有关操作系统、工具链和库的相关版本信息。在发送错误报告时很有用。
经过诊断:
我需要JDK_HOME ,ANDROID_HOME 环境变量的配置