본문 바로가기
오류 노트

[오류 해결] No matching variant of com.android.tools.build:gradle:7.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute '..

by Echung 2023. 8. 28.

안드로이드 스튜디오를 통해 처음 프로젝트를 생성 시 생기는 오류를 해결해보려고 한다.

  • No matching variant of com.android.tools.build:gradle:7.4.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: 

사진1. 오류 화면

위와 같이 오류가 발생되는 원인은 JDK버전이 낮아 해당하는 Gradle tool을 빌드하지 못해서 생기는 오류이다. 해결 방법은 간단하다.

 

1. 안드로이드 스튜디오에서 Settings에 들어가 준다.

 

사진2. 오류 해결 방법

2. Build, Execution, Deployment > Build Tools > Gradle에서 Gradle JDK를 Android Studio java home으로 변경하면 된다.

사진3. 오류 해결 방법

3. Try Again or Reload Gradle Project를 해주면 된다.

사진4. 오류 해결 방법

4. 완료

사진5. 오류 해결

이렇게 간단히 오류를 해결할 수 있다. 

반응형