[해결]error.NonExistentClass: Hilt 로 ViewModel 에 Proto DataStore 인스턴스 전달할 때

Proto DataStore 에 Hilt 를 적용할 때 컴파일 오류가 발생하여 해결한 방법을 공유한다. Hilt + Proto DataStore + ViewModel 에서 문제 발생 지난 글에서 build.gradle.kts 를 공개한 이후 Proto DataStore 를 익혔다(지난 글: https://hhtt.kr/103026). 그런데 코드에 ViewModel Factory 를 이용해서 DataStore 인스턴스를 ViewModel 에 넣어주도록 되어 있어서 Hilt 로 주입하도록 바꾸려고 했다. 이 때, Preferences … Read more

[Attachment] build.gradle.kts for Compose + Retrofit + KSP + Room + Hilt

In order to apply Hilt to my project, I modified build.gradle.kts and updated Compose, Retrofit, KSP, Room, Hilt, etc. to the latest. Both build.gradle.kts are provided in an attachment. Korean version of this posting: https://hhtt.kr/103026 I decided to use Hilt. After struggling for over a day to apply HIlt to my project, I succeeded the … Read more

[첨부] build.gradle.kts for Compose + Retrofit + KSP + Room + Hilt

프로젝트에 Hilt 를 적용하기 위해서 build.gradle.kts 를 수정하고, 내친김에 Compose, Retrofit, KSP, Room, Hilt 등을 최신으로 판올림하였다. 두 build.gradle.kts 를 첨부 파일로 제공한다. Korean version of this posting: https://hhtt.kr/103039 Hilt 를 사용하기로 했다. 내 프로젝트에 HIlt 를 적용하기 위해서 하루 넘게 씨름을 하다가 그저께 저녁에 성공했다. 내가 목표한 것은, container 에 담긴 채 ViewModel Factory … Read more