Reputation: 2549
When i import my Gradle Java project with Intellij Idea
i get error
The project uses Gradle 2.12 which is incompatible with IDEA running on Java 10 or newer.
My Intellij Idea version is
IntelliJ IDEA 2019.2 (Community Edition)
Build #IC-192.5728.98, built on July 23, 2019
Runtime version: 1.8.0_211-b12 amd64
VM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Linux 4.15.0-20-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1956M
Cores: 4
Registry: git.explicit.commit.renames.prohibit.multiple.calls=false
Non-Bundled Plugins:
How to fix this issue?
Upvotes: 13
Views: 56857
Reputation: 1
If IDEA still uses Java10 and above after startup, it is probably because IDEA comes with a higher version of Java. Solution: Rename the jbr directory in the IDEA installation directory.
Upvotes: 0
Reputation: 173
On Intellij press Ctrl+shift+a -> Choose Runtime ->choose JDK version
If you don't see the option, then download and install "Choose Runtime"(https://plugins.jetbrains.com/plugin/12836-choose-runtime) from Marketplace
Upvotes: 6
Reputation: 1621
JetBrains promised to fix in version 2020.1.1 : https://youtrack.jetbrains.com/issue/IDEA-237220
Upvotes: 0
Reputation: 2549
I have found a solution for this. On Intellij press Ctrl+shift+a -> Switch Boot JDK ->choose JDK version
Another solution is use Intellij Utimate Edition. Choose file/Setting and configure Gradle and Java version
Upvotes: 20
Reputation: 1104
In case if you didn't find switch boot JDK option in IDEA you can use
"choose runtime" plugin.
https://www.jetbrains.com/help/idea/switching-boot-jdk.html
if you want it in action, try Ctrl + shift + A then type choose runtime , in the dialog choose run time select the runtime you want.
Upvotes: 9