Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- boj
- pandas
- 쿠링
- Codeforces
- architecture
- AWS
- Kotlin
- Python
- TEST
- textfield
- ProGuard
- android
- Hilt
- 암호학
- MiTweet
- relay
- activity
- 코루틴
- Compose
- GitHub
- livedata
- 프로그래머스
- androidStudio
- Coroutines
- Coroutine
- 코드포스
- MyVoca
- Gradle
- Rxjava
- 백준
Archives
- Today
- Total
목록Application (1)
이동식 저장소

Hilt를 사용하려면 ``Application`` 클래스에 ``@HiltAndroidApp`` 어노테이션을 붙여야 한다. ``@HiltAndroidApp``은 Hilt component 코드를 만드는 시발점이다. @HiltAndroidApp class MyVocaApplication: Application() { @Inject lateinit var foo: Foo } 사실 ``Application``도 Hilt의 entry point이다. 따라서 ``Application``에서도 변수를 주입받을 수 있으며, 해당 변수는 ``super.onCreate()`` 안에서 주입된다. 물론 해당 변수를 제공할 바인딩이 ``SingletonComponent``에 존재해야 한다. 잠깐 복습! 바인딩의 위치를 결정하는..
Primary/Android
2022. 8. 11. 20:54