App Architecture, MVVM and Hilt Interview Questions for Android App Development
25 App Architecture, MVVM and Hilt questions with answers for android app development roles — 6 easy, 16 medium, 3 hard.
About App Architecture, MVVM and Hilt
Google's recommended architecture uses a UI layer with ViewModels, an optional domain layer and a data layer with repositories. This topic covers MVVM, unidirectional data flow, MVI, dependency injection with Hilt, SavedStateHandle, modularisation and design decisions. Senior interviews focus heavily on these trade-offs and how you structure large codebases.
Why should a ViewModel never hold a reference to an Activity, Fragment or View?
Show answer
What is unidirectional data flow?
Show answer
What is dependency injection and why use Hilt?
Show answer
Unit tests for a ViewModel are hard to write because it creates the repository inside itself. What do you change?
Show answer
A new developer asks why we need interfaces for every repository. How do you answer?
Show answer
Explain the recommended layers in Android app architecture.
Show answer
What is the difference between MVVM and MVI?
Show answer
What is a repository and why is it the single source of truth?
Show answer
What is a use case in the domain layer and when is it worth adding?
Show answer
Write a Hilt module that provides Retrofit and a repository binding.
Show answer
Write a HiltViewModel that exposes a single UiState using StateFlow.
Show answer
What is the difference between @Provides and @Binds in Hilt?
Show answer
What is SavedStateHandle and when do you use it?
Show answer
A ViewModel has grown to 1500 lines handling many responsibilities. How would you refactor it?
Show answer
Two screens show different values for the same cart count. How do you fix the architecture?
Show answer
You are starting a new app for a fintech startup. Which architecture and libraries would you choose and why?
Show answer
How do you share data between two screens in a checkout flow?
Show answer
Write a use case that combines cart items and a coupon into a final total.
Show answer
How do you handle one-time navigation after a successful login in MVVM?
Show answer
Describe a project where you improved code quality for the whole team.
Show answer
How do you mentor junior Android developers?
Show answer
How do you structure a large Android app into modules?
Show answer
Product wants a feature flag to turn a new checkout on or off without releasing an update. How do you design it?
Show answer
How would you lead an architecture decision when senior developers disagree?
Show answer
Frequently asked questions
How important is App Architecture, MVVM and Hilt in Android App Development interviews?
Google's recommended architecture uses a UI layer with ViewModels, an optional domain layer and a data layer with repositories. This topic covers MVVM, unidirectional data flow, MVI, dependency injection with Hilt, SavedStateHandle, modularisation and design decisions. Senior interviews focus heavily on these trade-offs and how you structure large codebases.
How should I use the App Architecture, MVVM and Hilt sheet?
Go top to bottom — easy to hard. Answer before opening each answer, tick what you solved and save misses to Last-Minute Revision.