Hilt
| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| September 10, 2025 | 1.3.0 | - | - | - |
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Hilt Version 1.3
Version 1.3.0
September 10, 2025
androidx.hilt:hilt-*:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0:
- The
hiltViewModel()APIs for Compose have been moved to a new artifact (androidx.hilt:hilt-lifecycle-viewmodel-compose) and package (androidx.hilt.lifecycle.viewmodel.compose) such that they can be used without transitively depending onandroidx.navigation.
Version 1.3.0-rc01
August 27, 2025
androidx.hilt:hilt-*:1.3.0-rc01 is released with no notable changes since 1.3.0-beta01. Version 1.3.0-rc01 contains these commits.
Version 1.3.0-beta01
August 13, 2025
androidx.hilt:hilt-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.
Version 1.3.0-alpha02
July 2, 2025
androidx.hilt:hilt-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.
API Changes
- The
hiltViewModel()APIs for Compose have been moved to a new artifact (androidx.hilt:hilt-lifecycle-viewmodel-compose) and package (androidx.hilt.lifecycle.viewmodel.compose) such that they can be used without transitively depending onandroidx.navigation. (Ifb222, b/328104152)
Version 1.3.0-alpha01
May 7, 2025
androidx.hilt:hilt-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
API Changes
- Updates the library and annotation processor to target Kotlin 2.0 to support newer Kotlin toolchain including KSP2.
Hilt Version 1.2
Version 1.2.0
February 21, 2024
androidx.hilt:hilt-*:1.2.0 is released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
- Add assisted injection support to
hiltViewModel()andhiltNavGraphViewModels(). Now these functions take an additional callback in which you can use the passed in assisted factory to create an assisted injectedViewModel.
Version 1.2.0-rc01
February 7, 2024
androidx.hilt:hilt-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
Version 1.2.0-beta01
January 24, 2024
androidx.hilt:hilt-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
Version 1.2.0-alpha01
December 13, 2023
androidx.hilt:hilt-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
API Changes
- Add overloaded
hiltViewModel()andhiltNavGraphViewModels()functions for assisted injection support. (Ieb98d)
Hilt Version 1.1.0
Version 1.1.0
November 1, 2023
androidx.hilt:hilt-*:1.1.0 is released. Version 1.1.0 contains these commits.
Major changes since 1.0.0
- Add KSP support to
androidx.hilt. - Accept
HasDefaultViewModelProviderFactoryinhiltViewModel(). - The
hiltViewModel()API now takes an optional key parameter.
Version 1.1.0-rc01
October 18, 2023
androidx.hilt:hilt-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
Version 1.1.0-beta01
androidx.hilt:hilt-common:1.1.0-beta01, androidx.hilt:hilt-compiler:1.1.0-beta01, androidx.hilt:hilt-work:1.1.0-beta01, androidx.hilt:hilt-navigation:1.1.0-beta01, androidx.hilt:hilt-navigation-compose:1.1.0-beta01, and androidx.hilt:hilt-navigation-fragment:1.1.0-beta01 are released.
Version 1.1.0-alpha01
August 9, 2023
androidx.hilt:hilt-common:1.1.0-alpha01, androidx.hilt:hilt-compiler:1.1.0-alpha01, and androidx.hilt:hilt-work:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.
New Features
- Add KSP support to
androidx.hilt. Note that this is to prepare for Hilt’s KSP support. In order to use the KSP version of androidx.hilt, the main Hilt support has to be released.
Hilt-Navigation-Fragment Version 1.1.0
Version 1.1.0-alpha02
April 19, 2023
androidx.hilt:hilt-navigation-fragment:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.
API Changes
- Accept
HasDefaultViewModelProviderFactoryinhiltViewModel()(I10ab6, b/249548618, b/195190169)
Bug Fixes
- Fixed an issue where
hiltNavGraphViewModel()doesn’t injectSavedStateHandle. (3ef114, b/272099838)
Hilt-Navigation Version 1.1.0
Version 1.1.0-alpha02
April 19, 2023
androidx.hilt:hilt-navigation:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.
Version 1.1.0-alpha01
December 7, 2022
androidx.hilt:hilt-navigation:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
Hilt-Navigation-Compose Version 1.1.0
Version 1.1.0-alpha01
December 7, 2022
androidx.hilt:hilt-navigation-compose:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
API Changes
- The
hiltViewModel()API now takes an optional key parameter. This allows you to get multiple instances of the sameViewModeltype using different keys. (I6ee47, b/245139957)
Hilt-Navigation-Compose Version 1.0.0
Version 1.0.0
January 26, 2022
androidx.hilt:hilt-navigation-compose:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
The androidx.hilt:hilt-navigation-compose artifact provides APIs that allow users to get a @HiltViewModel annotated ViewModel from a Navigation back stack entry within a Compose application using :navigation-compose.
The function hiltViewModel() returns an existing ViewModel or creates a new one scoped to the current navigation graph present on the NavController back stack. The function can optionally take a NavBackStackEntry to scope the ViewModel to a parent back stack entry.
Version 1.0.0-rc01
December 15, 2021
androidx.hilt:hilt-navigation-compose:1.0.0-rc01 is released with no changes since 1.0.0-beta01. Version 1.0.0-rc01 contains these commits.
Version 1.0.0-beta01
November 17, 2021
androidx.hilt:hilt-navigation-compose:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
API Changes
- Remove deprecated
hiltNavGraphViewModel()function and its overloads. These were all replaced byhiltViewModel(). (Iaf7d7)
Version 1.0.0-alpha03
June 16, 2021
androidx.hilt:hilt-navigation-compose:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
API Changes
- The
hiltViewModel()method now aligns with theviewModel()API changes in Lifecycle-ViewModel-Compose1.0.0-alpha07and now takes an optionalViewModelStoreOwnerparameter, rather than having a no argument version and one that takes only aNavBackStackEntry. This allows you to continue to usehiltViewModel()to access the default owner provided byLocalViewModelStoreOwneror usehiltViewModel(navBackStackEntry)or anotherViewModelStoreOwnerto specify any specific owner. (I2628d)
Version 1.0.0-alpha02
May 18, 2021
androidx.hilt:hilt-navigation-compose:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
API Changes
- Renamed
hiltNavGraphViewModel()tohiltViewModel()and removed the extension onNavControllersince a user can directly use thenavigation-composeAPI for getting aNavBackStackEntryfrom a route. (I6ef57)
Compose Compatibility
androidx.hilt:hilt-navigation-compose:1.0.0-alpha02is only compatible with Compose version1.0.0-beta07and above.
Dependency updates
hilt-navigation-composenow depends on Navigation2.4.0-alpha01.
Version 1.0.0-alpha01
March 10, 2021
androidx.hilt:hilt-navigation-compose:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
- The
:hilt-navigation-composeartifact provides APIs that allow users to get a@HiltViewModelannotatedViewModelfrom a Navigation back stack entry within a Compose application using:navigation-compose. The functionhiltNavGraphViewModel()can either take aNavBackStackEntryor a 'route' string that can be used to scope theViewModelto either the current back stack entry or to a parent entry in the stack. (Ia9234)
Hilt Version 1.1
Version 1.1.0-beta01
October 4, 2023
androidx.hilt:hilt-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
androidx.hilt:hilt-*:1.1.0-beta01 is released with no changes since 1.1.0-alpha*.
Hilt Version 1.0.0
Version 1.0.0
May 5, 2021
androidx.hilt:hilt-*:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
The androidx.hiltartifacts offers extensions for integrating Hilt with various other AndroidX libraries, such as WorkManager and Navigation. To see a list of features and examples check out the integration documentation.
Version 1.0.0-beta01
March 10, 2021
androidx.hilt:hilt-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
API Changes
- Remove
@Deprecatedtypes from the AndroidX Hilt artifacts, specifically@androidx.hilt.ViewModelInjectand@androidx.hilt.Assisted. Note that@ViewModelInjectwas replaced by @HiltViewModel. (I626fe)
Version 1.0.0-alpha03
January 27, 2021
androidx.hilt:hilt-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
New Features
- Provide APIs for retrieving
@HiltViewModelannotated ViewModel from a NavigationNavBackStackEntry. The artifacthilt-navigation-fragmentoffers ahiltNavGraphViewModelsKotlin extension whilehilt-navigationexposes aHiltViewModelFactoryfactory method that takes in aNavBackStackEntryas argument and returns aViewModelProvider.Facctorythat can be used withViewModelProvideror other View Model retrieving APIs, such as Compose’sviewModel()function:viewModel(HiltViewModelFactory(AmbientContext.current, backStackEntry)). (I00e67)
API Changes
- Replace
@WorkerInjectwith@HiltWorker.@HiltWorkeris now a type annotation and requires the usage of @AssistedInject in the constructor. (Ic2f15) - Deprecate
@ViewModelInject. Equivalent functionality is now offered by@HiltViewModel, which is now part of the core Hilt Android APIs. (I36a41)
Bug Fixes
- Fix an issue where AndroidX Hilt extension Modules would not get correctly picked up by Hilt causing Workers to not be available for creation. (I3181c, b/159540434)
- Migrate AndroidX Hilt extensions to the
SingletonComponent, removing the deprecated warning of usingApplicationCompoonent. (I9c916, b/175849092)
Version 1.0.0-alpha02
July 22, 2020
androidx.hilt:hilt-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
Bug Fixes
- Fixed an issue of duplicate saved state keys when a non-Hilt injected ViewModel was requested from an
@AndroidEntryPoint-annotated class. (b/158737069) - Fixed an issue in
HiltWorkerFactorywhere it wouldn’t correctly initialize nested Worker classes annotated with@WorkerInject. (b/160524718)
Version 1.0.0-alpha01
June 10, 2020
androidx.hilt:hilt-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
The androidx.hilt package and libraries extend the functionality of Dagger Hilt to enable dependency injection of certain classes from the androidx libraries.