Issue
I get a ionic project from a person, and I want to debug it in a real android device.
I use this command:
ionic cordova run android --device --verbose
And in the end I get these error messages:
Preparing Firebase on Android
No scripts found for hook "before_compile".
Failed to find 'JAVA_HOME' environment variable. Try setting it manually.
CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually.
I have JAVA_HOME
set, indeed if I do echo $JAVA_HOME
I get:
/usr/lib/jvm/java-1.11.0-openjdk-amd64
According to Failed to find 'JAVA_HOME' environment variable. Try setting it manually post, I also tried adding bin
folder to JAVA_HOME
variable, without any success.
If I also try java -version
and javac -version
I get success messages.
Solution
SOLVED
Version 10.0.0 of Cordova requires jdk version 8. That's it.
Answered By - Giacomo M
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.