dagger-hilt Questions
3
Solved
how to use hilt with ksp instead of kapt seems like i can't figure it out
please let me know what dependencies should i add and how should i add them
dependencies i added:
//hilt
val hiltVersion =...
Edi asked 12/4 at 11:42
8
I have an error concerning Hilt, I"ve been trying to inject a retrofit interface I created using Hilt,
Here is the error:
java.lang.ClassNotFoundException: Didn't find class "com.kotlin...
Urmia asked 22/5, 2021 at 14:9
1
Solved
I have a multi module project setup like this:
app module
presentation module (Android module)
domain module (Kotlin module)
data module (Android module)
The dependency graph
presentation -&g...
Creep asked 21/7 at 6:51
7
I'm getting this not very informative error while building my project in Android Studio.
I've tried everything from stackoverflow but nothing works.
Execution failed for task ':app:kaptDebugKotlin'...
Savoie asked 16/2, 2022 at 0:47
3
I like to keep the number of third party libraries used in my Android Apps to an absolute minimum.
I had started using Dagger2, then switched to Koin.
Koin is such a great improvement on Dagger2.
K...
Xeniaxeno asked 13/11, 2020 at 16:18
2
Solved
How to pass parameter to viewmodel constructor using HiltViewModel library with jetpack compose
My code:
@HiltViewModel
class GetPurchaseViewModel @Inject constructor(val id:Long) : ViewModel() {
...
Gandy asked 5/1, 2022 at 0:43
1
Let's assume I have a multimodule Jetpack Compose project with feature modules and I want to scope some object instances to features lifecycles. For example, I want to scope AuthRepo instance to Au...
Etruscan asked 13/12, 2023 at 14:22
3
Solved
Getting error below while using dagger-hilt
Unsupported metadata version. Check that your Kotlin version is >=
1.0: java.lang.IllegalStateException: Unsupported metadata version. Check that you...
Involucrum asked 21/7, 2022 at 5:39
4
I have stumbled upon this quite trivial, but tricky problem. I have spent a decent amount of time searching official docs, but unfortunately found no answer.
Official docs say that you should pass ...
Keratinize asked 26/4, 2022 at 20:41
2
After updating Android Studio to the new release (Jellyfish) and updating the Android Gradle Plugin to 8.4, my release builds are failing with a slew of issues related to things injected with dagga...
Osmious asked 5/5 at 21:45
4
Solved
When I use interface like below in viewmodel
class MainViewModel @ViewModelInject constructor(
private val trafficImagesRepository: TrafficImageRepository, <----------------- Not working
@Assi...
Taunt asked 30/1, 2021 at 8:38
2
Solved
I was wondering that is it possible to use field injection outside of fragment or activity? I know I can use constructor injection but, I am wondering is it possible with field injection, as well. ...
Simplistic asked 20/1, 2021 at 16:29
3
Solved
I am trying to follow guide from https://developer.android.com/training/dependency-injection/hilt-jetpack#workmanager and encountered following error
E/WM-WorkerFactory: Could not instantiate com....
Stoss asked 13/6, 2020 at 3:46
1
Solved
I am running a project with Jetpack Compose. And I'm using Kotlin DSL. And I added the dagger hilt to my project and I'm having an issue with the project.
java.lang.IllegalStateException: The Hilt...
Salve asked 16/4 at 5:48
3
Solved
I am trying to use hilt for my project which contains dynamic features. I am facing an error that I cannot fully understand why. I get an error like this:
java.lang.ClassCastException: com.social.a...
Tinnitus asked 29/7, 2020 at 10:31
1
Solved
I am using Android Studio Iguana | 2023.2.1 Patch 1. Create sample project it default configured build.gradle.kts(app) in this gradle "libs.versions.toml" file created,
Now i add hilt on ...
Shirring asked 15/4 at 7:29
24
Solved
I was tried to run my code in Kotlin 1.5.10
With plugin as
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
and dependencies as below
dep...
Research asked 28/5, 2021 at 18:35
4
What's the difference between these two? I think they both annotate a singleton object/instance, but somehow @Singleton can be used to annotate methods, instead of classes. I'm really confused abou...
Nationwide asked 25/11, 2020 at 18:19
3
I'm learning to use Jetpack Compose and I was trying to follow a tutorial to create a Pokedex with Hilt and MVVM, everything was going well until I tried to implement the viewModel, when I injected...
Lavonia asked 13/4, 2022 at 0:5
8
Solved
The app crashes as soon as it gets installed and throws the weird error above.
I have annotated the activity as shown below as well as its child fragments.
@AndroidEntryPoint
class HomeActivity : ...
Theologize asked 22/9, 2020 at 8:43
3
Solved
I'm building an Android app that uses Dagger-Hilt.
Altough Dagger-Hilt is in my build.gradle file as you can see below,
build.gradle (project file):
buildscript {
ext {
compose_version = '1.1.0-b...
Chubby asked 3/9, 2022 at 6:27
13
Solved
Here is my AllFilesListViewModel class.
class AllFilesListViewModel @ViewModelInject constructor(
private val pdfItemRepository: PdfItemRepository):ViewModel() {
}
Here is PdfItemRepository cl...
Piquet asked 19/6, 2020 at 13:55
3
Solved
I have found a similar question here. At the time of writing this question there is only this answer avaliable, which does not provide any help to me, and I believe also to the person who asked the...
Unimpeachable asked 1/5, 2021 at 19:54
1
I am trying to set up basic Hilt dependency injection in a new project. This is a brand-new project with no added files.
Android Studio version is Hedgehog (2023.1.1) Patch 2.
I chose New Project &...
Chazan asked 20/2 at 16:17
15
Solved
I get the following warning when I want to use @AndroidEntryPoint which is a property of hilt in my project.
Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin?...
Preferment asked 9/10, 2021 at 23:47
1 Next >
© 2022 - 2024 — McMap. All rights reserved.