I am new to the react native.
I am using a linux machine
. I am trying to run an application.
Now, Here what I have done ,
I already have java installed in my machine .So, that time I have added,
in my profile
I have following env variables .
export JAVA_HOME='/usr/local/java'
export PATH=$PATH:$HOME/bin:$JAVA_HOME/jdk1.8.0_121/bin
Now, after that I have installed the android studio
in my one of folders,
which is /home/softwares/android-studio
.
That time I have added the env variables in the profile file.which are
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Now, my project folder is like ,
/home/projectWork/native/app
Added the script in the package.json file , but there
it is giving me this error .
JS server not recognized, continuing with build...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
ERROR: JAVA_HOME is set to an invalid directory: /usr/local/java
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Now, I am not getting a way to resolve this issue . Can any one help me with this ?