小编Jot*_*aro的帖子

找不到“JAVA_HOME”环境变量。尝试手动设置

我正在尝试使用以下命令在我的 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)

有什么建议吗?

linux android ionic-framework

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

android ×1

ionic-framework ×1

linux ×1