我正在尝试使用以下命令在我的 Android 设备上运行示例应用程序:
sudo ionic cordova run android --device
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
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.
Run Code Online (Sandbox Code Playgroud)
我已经设置了 JAVA_HOME 环境变量,但这不起作用。
~/Ionic/helloWorld$ echo $JAVA_HOME
/usr/lib/jvm/java-12-openjdk-amd64
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?