When building a project with gradle, a jdk mismatch error may occur, when the following error occurs:
Execution failed for task ':java-app:compileJava'.
> Could not target platform: 'Java SE 8' using tool chain: 'JDK 7 (1.7)'.
The solution is to add a command that defines the jdk version after the command:
gradle uploadArchives -Dorg.gradle.java.home=D:/glzf/Java/jdk1.8.0_20