I'm trying to run a sample app on my android device with the following command :
sudo ionic cordova run android --device
I'm getting this error :
Failed to find 'JAVA_HOME' environment variable. Try setting it manually.
[ERROR] An error occurred while running subprocess cordova.
cordova build android --device exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I already set the JAVA_HOME environment variable but that doesn't work .
~/Ionic/helloWorld$ echo $JAVA_HOME
/usr/lib/jvm/java-12-openjdk-amd64
Any recommendations ?


