cordova生成失败:无法从“11.0.6”确定java版本

9ceoxa92  于 2021-07-08  发布在  Java
关注(0)|答案(0)|浏览(227)

环境:

macos:10.15.7
java:1.8.0_241
grade:4.6
cordova:10.0.0

问题:

cordova生成失败

cordova build --scan
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /Users/zenghao/Library/Android/sdk

FAILURE: Build failed with an exception.

* What went wrong:

Could not determine java version from '11.0.6'.

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Command failed with exit code 1: /Users/zenghao/.sdkman/candidates/gradle/4.6/bin/gradle -p /Users/zenghao/Code/work/MobileBot/mobilebot_app/platforms/android wrapper -b /Users/zenghao/Code/work/MobileBot/mobilebot_app/platforms/android/wrapper.gradle

但是我已经检查了我的java版本,它不是11.0.6

jenv versions
  system

* 1.8.0.241 (set by /Users/zenghao/.java-version)

  11.0.6
  openjdk64-11.0.6
  oracle64-1.8.0.241

还有我的grad尔版本

gradle -v

------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------

Build time:   2018-02-28 13:36:36 UTC
Revision:     8fa6ce7945b640e6168488e4417f9bb96e4ab46c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_241 (Oracle Corporation 25.241-b07)
OS:           Mac OS X 10.15.7 x86_64

如何纠正这些问题?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题