CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually
问题 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