Okay it took me almost a night. But i solved the problem. The problem was in the version of Java you’re using. If you’re using java version 13 or so, the current or latest which you can check by typing java -version
in terminal, but it requires Java 8 to run the application. So you can add this line,
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
and add it to the .bash_profile.rc file of your system and then you can switch easily between java version 8 and current.
Just enter command : j8
in to your terminal and it will switch to java version 8 and then run npm run start-android
to start android application.
1 Like