개발/Android Studio 에러

에러: Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

스몰스테핑 2024. 10. 23. 21:33

A problem occurred evaluating project ':app'.


> Failed to apply plugin 'com.android.internal.application'.


   > Could not create an instance of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.


      > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions.


         > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions$UnitTestOptions.


            > 'void org.gradle.api.internal.DefaultDomainObjectSet.<init>(java.lang.Class)'


Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

 

https://small-stepping.tistory.com/1213

 

에러:

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-downlo

Unable to find method ''void org.gradle.api.internal.DefaultDomainObjectSet.(java.lang.Class)''
'void org.gradle.api.internal.DefaultDomainObjectSet.(java.lang.Class)'

Gradle's dependency cache may be corrupt (this sometimes occurs af

small-stepping.tistory.com

 

위 에러가 발생한 후, 터미널에서 gradle cleanBuildCache를 실행한 후 발생한 오류이다.

 

어찌되었든 gradle과 플러그인 버전 호환의 문제이다.

 

1. build.gradle의 dependencies { classpath 'com.android.tools.build:gradle:버전' }

2. gradle\wrapper\gradle-wrapper.properties의 distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip

위 두개를 아래 링크, 이미지를 참고해서 변경해보자.

 

다음 링크를 참고해보자.

https://developer.android.com/build/releases/gradle-plugin?hl=ko#updating-gradle

 

Android Gradle 플러그인 8.6 출시 노트  |  Android Studio  |  Android Developers

Android 스튜디오 빌드 시스템은 Gradle을 기반으로 하며 Android Gradle 플러그인에는 Android 앱을 빌드하는 데 사용하는 몇 가지 추가 기능이 있습니다.

developer.android.com