Could not resolve all dependencies for configuration ':compileClasspath'

문제

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, implementation=vendor-specific} for MAC_OS on x86_64.

No locally installed toolchains match and toolchain download repositories have not been configured.

 

 

해결법

자바 컴파일러와 빌드도구 버전이 설정되지 않았거나 , 다른 것입니다

자신의 Gradle의 맞는 자바 sdk를 다운받은뒤 아래 설정에서 변경해주면 해결됩니다.