I\'m running a Linux Ubuntu 18 OS. Installed jdk in a custom local directory.
Normally, IntelliJ recommends that you use the default gradle wrapper. But
I recently upgraded my Ubantu to 18 from 16. After that I am facing this issue. Problem was during ubantu upgrade java is automatically upgraded to 11 from 8. Hence getting this error. You can simply downgrade jdk using this to solve this. Works for me.
MODIFY default Boot JDK
RESTART intellij idea
IGNORE this popup at right-bottom on IDE
HOPE this solution is work for you .