close

[Solved] Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’

Hello Guys, How are you all? Hope You all Are Fine. Today I am importing Gradle project in Intellij Idea But I am facing following error Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ Error Occurs ?

I am importing Gradle project in Intellij Idea But I am facing following error.

Could not target platform: 'Java SE 8' using tool chain: 'JDK 7 (1.7)'

How To Solve Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ Error ?

  1. How To Solve Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ Error?

    To Solve Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ Error Just Change Gradle JVM. First of all Go to File. Select Setting. Then, Build, Execution, Deployment. Select Build Tools. Then Tap On Gradle. Gradle JVM: change to version 1.8 Now, Re-run the gradle task. Now, Your error must be solved

  2. Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’

    To Solve Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’ Error Just Change Gradle JVM. First of all Go to File. Select Setting. Then, Build, Execution, Deployment. Select Build Tools. Then Tap On Gradle. Gradle JVM: change to version 1.8 Now, Re-run the gradle task. Now, Your error must be solved

Solution 1: Change Gradle JVM

Just Change Gradle JVM.

  1. First of all Go to File.
  2. Select Setting.
  3. Then, Build, Execution, Deployment.
  4. Select Build Tools.
  5. Then Tap On Gradle.
  6. Gradle JVM: change to version 1.8
  7. Now, Re-run the gradle task.
  8. Now, Your error must be solved

Solution 2: Select correct version

Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JVM -> Select correct version.

Then also have to adding below line in your build.gradle dependencies

compileOnly group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment