An Android project, It was good with the older version of Android Studio. But after I updated the IDE version, An exception will occured when I build the project whith gradle.
Here is the problem:
Error:Execution failed for task ':jellyrefresh:compileReleaseJava'.
When running gradle with java 5, 6 or 7, you must set the path to jdk8, either with property retrolambda.jdk or environment variable JAVA8_HOME
The thing is, my environment is Windows XP(I don't want to update), So I cannot install Java 8, so no need to tell me to do that. But I still want to use the Android Studio's latest version.
So what's the most resonable solution to this exception?
Go to File -> Project Structure -> SDK Location -> JDK Location and change the path to Java 8 Home, then Rebuild project.
The snapshot was taken from Mac. However, it should work for others too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With