我正在尝试 运行 AVD with react-native,但出现未知变量错误
I am trying to run AVD with react-native, but an unknown variable error appears
我正在尝试 运行 在 android studio 中将通过 react-native 创建的代码作为 AVD,但我收到有关变量 JAVA_HOME 的错误。我该怎么办?
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_131
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
有时我们需要手动设置 JAVA_JDK
的路径(环境)。从官方网站安装最新的 JAVA JDK。并设置jre和bin文件夹的路径。查看你的目录 C:\Program Files\Java\jdk1.8.0_131
后,我猜你在 windows 上,所以我不确定如何为 windows 设置环境变量,但你肯定可以从 youtube 获得帮助。
我正在尝试 运行 在 android studio 中将通过 react-native 创建的代码作为 AVD,但我收到有关变量 JAVA_HOME 的错误。我该怎么办?
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_131
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
有时我们需要手动设置 JAVA_JDK
的路径(环境)。从官方网站安装最新的 JAVA JDK。并设置jre和bin文件夹的路径。查看你的目录 C:\Program Files\Java\jdk1.8.0_131
后,我猜你在 windows 上,所以我不确定如何为 windows 设置环境变量,但你肯定可以从 youtube 获得帮助。