Similar to:
- Intellij 14 the supplied javaHome seems to be invalid
- Android Studio - supplied javaHome is not a valid folder
However, I am trying to use
After trying all above solution nothing worked for me. Then i looked whether the "Use project jdk" path for java is correct. To look it under File->settings->gradle-> gradle jvm I found that jdk got updated and gradle was using old jdk version. So, solution was to update Project jdk path for java in intellij. File->project structure->Platform setting->SDK, here update your right jdk path. thus the problem got solved for me.