kotlin - Gradle Build Error (Possibly Related to JDK version) - Stack Overflow

I am trying to build a koltin project but when after I pit pull my groupmates work and build it i got e

I am trying to build a koltin project but when after I pit pull my groupmates work and build it i got errors like:


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all dependencies for configuration ':compileClasspath'.
   > Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
      > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17, vendor=any vendor, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.

* Try:
> Learn more about toolchain auto-detection at .12.1/userguide/toolchains.html#sec:auto_detection.
> Learn more about toolchain repositories at .12.1/userguide/toolchains.html#sub:download_repositories.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at .

BUILD FAILED in 644ms
aliacai@heyuns-air WatCourse % gradle build
Kotlin does not yet support 23 JDK target, falling back to Kotlin JVM_22 JVM target
Kotlin does not yet support 23 JDK target, falling back to Kotlin JVM_22 JVM target

> Task :compileKotlin FAILED
Kotlin does not yet support 23 JDK target, falling back to Kotlin JVM_22 JVM target

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (23) and 'compileKotlin' (22).
  
  Consider using JVM Toolchain: 
  Learn more about JVM-target validation:  

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at .

BUILD FAILED in 746ms
1 actionable task: 1 executed

I thought it had do with jdk version by mine is 21 already.

Currently I have no idea right now. Can someone take a look at the error message for me and give me some suggestions about how to fix it? Thank you!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744992877a4605011.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信