我最近在Mac(MacOS 10.14)上从oracle(1.8.0_212)安装了最新的jdk8。
当我尝试在Android Studio内部和外部运行gradle时,都会得到以下信息:
➜ ~ gradle
Error: Could not find or load main class java.se.ee
或
ERROR: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error: Could not find or load main class java.se.ee
我尝试添加以下内容作为环境变量:
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
我还在Android Studio中的gradle-wrapper.properties文件中添加了以下内容:
org.gradle.jvmargs=-Xmx2560M -XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
我还尝试过恢复到旧版本的jdk8,但问题仍然存在。