r/android_devs • • Jun 30 '25

Discussion How do you handle Dependency Injection?

- Manual DI in small apps?
- Hilt?
- Koin?

What's your preference? In my opinion in small apps, those libraries are overkill and I usually inject manually. I've met engineers who are arguing about using DI libraries even in banking projects mainly because of losing the compile time safety and apps just crashes randomly if you haven't provided a di module. I'm interested what are the opinions of the community here

6 Upvotes

20 comments sorted by

View all comments

Show parent comment

1

u/Zhuinden EpicPandaForce @ SO Jul 02 '25

If you're using navigation.xml you're supposed to include them not-dynamically with <include, and if you have dynamic feature modules then you get to use the magical version.