JDK 21 마이그레이션 과정에서 생긴 이슈

이성민·2024년 12월 4일
0

안드로이드

목록 보기
11/19

이번에 회사에서 사용하는 Java 버전을 1.8 에서 21 로 업데이트 하게 되었다.
무려 3일을 잡아먹은 힘든 작업...
간절한 기도를 통해 해결할 수 있었다 ㅠㅠ

이 과정에서 발생한 이슈들을 정리해두고자 한다.

Minimum supported Gradle version is 8.9. Current version is 8.5.Please fix the project's Gradle settings.

gradle 및 플러그인 버전을 수정해줘야 했다.

Something went wrong while checking for version compatibility between the Compose Compiler and the Kotlin Compiler. It is possible that the versions are incompatible. Please verify your kotlin version and consult the Compose-Kotlin compatibility map located at

gradle 버전을 수정하며 kotlin 버전도 같이 업데이트를 해주니 해결되었다.

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.

이를 해결하기 위해 Preferences > Build, Execution, Deployment -> Compiler 로 들어가 Command line Options 에 '--warning-mode all' 를 넣어주면 된다.
이 부분은 에러가 아닌 경고이기에 추가할지 말지 후에 다시 생각해 보기로 했다.

Could not get unknown property 'source' for generate-proto-generateDebugProto of type org.gradle.api.internal.file.DefaultSourceDirectorySet.

protobuf 플러그인 버전을 업데이트 해주니 해결되었다.

Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

build.gradle 파일에 패키지 명대로 namespace를 정의해주면 된다.

[Hilt] Processing did not complete. See error above for details.
error: [Hilt]
Unsupported metadata version. Check that your Kotlin version is >= 1.0: java.lang.IllegalStateException: Unsupported metadata version. Check that your Kotlin version is >= 1.0

hilt 버전이 kotlin 버전과 맞지않아 생기는 문제이다. 이 문제를 해결하는데 제일 많은 시간이 든거같다... 스택오버플로우를 참고하여 현재 업데이트 한 kotlin 버전 1.9.24 에 맞게 hilt 버전을 2.52 로 업데이트 하였다.





참고

https://small-stepping.tistory.com/1215
https://www.pinslog.com/163
https://android-developer.tistory.com/14
https://holykisa.tistory.com/108
https://stackoverflow.com/questions/74634321/fixing-the-build-type-contains-custom-buildconfig-fields-but-the-feature-is-di/74634322#74634322
https://devuryu.tistory.com/448

profile
Android Developer 이성민입니다

0개의 댓글