Issue
I am trying to run the code created through react-native as AVD in android studio, but I am getting an error about the variable JAVA_HOME. What should I do?
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
Solution
Sometime we need to manually set the path (environment) of JAVA_JDK
. Install latest JAVA JDK from official website. And set the path of jre and bin folder. After looking your directory C:\Program Files\Java\jdk1.8.0_131
I guess you are on windows , So I'm not sure how to set environment variable for windows but definitely you could get help from youtube.
Answered By - TripleM
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.