IDEA cannot compile existing external libraries
Answered
Hello,
it occur a strange problem when I develop with IDEA,
I use external libraries (like Gson) and I have imported the library,
but I rebuild project, it occurred errors like this,

How do I fix it?
I already set the following setting:

I also clicked "Invalidate Cache/Restart" but it didn't work...
By the way, I do these in virtual machine is no problem, it can work successfully.
What happen in my computer ?
I use IDEA 2016.2, JDK 1.7, Gradle 4.7 in Windows 10
Can someone please give me some help here? thanks a trillion
Nick
Please sign in to leave a comment.
Hello,
Do you open the same project in your virtual machine? I also could not reproduce that in my environment.
Please try to upgrade your installation to the latest version of IntelliJ IDEA.
Hello,
I open the same project in my virtual machine.
I try to use IDEA 2019.2, JDK1.7, Gradle 4.7,
it occurred like this
For some reason I must use JDK 1.7.
Is there any other way to solve it?
I saw the log file, Gradle seems not to be able to build
Java 8 is required to run IntelliJ IDEA starting from version 2016 on all the supported platforms:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544879
Is it possible to run IntelliJ IDEA under JDK 1.8 and choose JDK 1.7 only as project's SDK?
It seems that I can only use JDK 1.8, thanks for your help!