Challenge 1: Application and Activity Setup — Solution // MyApplication.kt @HiltAndroidApp class MyApplication : Application() // AndroidManifest.xml — inside ... // MainActivity.kt @AndroidEntryPoint class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { // Hilt-injected composables/ViewModels can be used here } } } // What would go wrong without @AndroidEntryPoint: // If MainActivity used hiltViewModel() to obtain a @HiltViewModel- // annotated ViewModel but MainActivity itself was NOT annotated with // @AndroidEntryPoint, the app would crash at runtime with an error // indicating Hilt could not find an entry point / the Activity isn't // part of Hilt's dependency graph. @AndroidEntryPoint is what actually // wires a specific Activity (or Fragment) INTO Hilt's dependency // injection system — @HiltAndroidApp alone only sets up the app-wide // container, it doesn't automatically make every Activity injectable. Notes: - android:name=".MyApplication" in the manifest is what tells Android to actually instantiate MyApplication (rather than the default generic Application class) when the app process starts — @HiltAndroidApp alone on the class does nothing unless it's actually registered this way. - @AndroidEntryPoint is required on EVERY Activity/Fragment that uses Hilt injection, not just the launcher Activity — a multi-screen app needs this annotation repeated on each one that needs it.