Inflearn Community Q&A
안녕하세요.
Written on
·
411
0
안녕하세요. 질문드릴게 있어서 글 올립니다.
다름이 아니라 힐트 버전을 올리게 되면 Modlule에서 오류가 납니다.
※기존사용
@Module
@InstallIn
(ApplicationComponent::class)
공식문서에서는 힐트버전이 업데이트(2.28.1이상) 되면 아래와 같이 사용해야 한다는데, 계속 에러가 나네요.
관련 참고자료가 많이 없어 질문드립니다.
※공식문서 변경
@Module
@InstallIn
(SingletonComponent::class)
또는
(ActivityComponent::class)
현재 힐트버전
implementation 'com.google.dagger:hilt-android:2.31-alpha'
※에러내용
error: [Hilt]
@DefineComponent dagger.hilt.components.SingletonComponent is missing a parent declaration.
Please declare the parent, for example: @DefineComponent(parent = ApplicationComponent.class)
[Hilt] Processing did not complete. See error above for details.error: [Hilt]
@DefineComponent dagger.hilt.components.SingletonComponent is missing a parent declaration.
---
유튜브 강의를 듣다가 힐트 사용을 위해 본 강좌를 수강하게 되었으며, 바쁘시더라도 내용한번 검토하여 주시기 바랍니다. 항상 강의 감사히 잘 듣고 있습니다. 감사합니다.
Answer 4
2
답변감사합니다.
외부 라이브러리가 많아서 처음부터 다시 하나씩 구축하니 제대로 작동되었습니다. 원인을 찾게되면 다시 답글 달도록 하겠습니다.
교수님의 빠른 피드백 정말 감사합니다.
항상 좋은 강의로 도움많이 받고 있습니다.
좋은 주말 보내세요.
1
안녕하세요. 방금 버전 업 해서 테스트 해 봤는데 특별히 빌드가 안 되거나 하지는 않았습니다.
말씀해 주신대로 ApplicationComponent는 Singleton 과 Activity Component로 수정했고 버전만 올렸습니다.
다음 커밋 확인하셔서 놓친 부분이 없나 확인해 보시기 바랍니다.
https://github.com/junsuk5/android-hilt-lecture/commit/2238dea41836024be4ae0e28a091376d121a7981
0
안드로이드를 계속 하시려면 버전에 따른 사용법 변경에 익숙해 지셔야 합니다. 오늘 배운게 항상 옛 것이다 라는 마음으로...
안드로이드쪽이 유난히 심한 것 같은데 어쩔 수 없는 부분입니다.
0




