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

前端 未结 9 947
执笔经年
执笔经年 2020-12-12 19:57

I am trying to import Gradle project in Intellij Idea with local Gradle distrib and getting stacktrace with the following message: Could not target platform: \'Java SE

9条回答
  •  天涯浪人
    2020-12-12 20:26

    For IntelliJ 2019, JDK 13 and gRPC:

    Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JVM

    and Select correct version.

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

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

提交回复
热议问题