All Questions
Tagged with android-jetpack-compose dagger-hilt
229
questions
0
votes
0
answers
31
views
"Dagger Hilt: @Binds methods' parameter type must be assignable to the return type error"
I'm working on a Dagger Hilt setup in my Android project and encountered an error when using @Binds methods.
The error message is:
error: @Binds methods' parameter type must be assignable to the ...
-1
votes
0
answers
29
views
App stopped working after upgrading to build.ktx
I have no idea what wents wrong. I tried most approaches on stackoverflow but nothing works. All i figured out that it has something to do with my LdapContactsScreen
java.lang.IllegalStateException: ...
2
votes
2
answers
86
views
Error Build : A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
I am new with Jetpack Compose and Hilt, I got problems when building the application after implementing the class module
Execution failed for task ':app:kaptDebugKotlin'.
A failure occurred while ...
0
votes
1
answer
134
views
Hilt 2.44.2 - Class not found when use @AndroidEntryPoint at GlanceAppWidgetReceiver
I am implementing widget using Glance API. I am trying to inject dependencies to my widget receiver, however I face an exception in debug mode.
Everything works fine with Activity and ViewModel. What ...
2
votes
1
answer
126
views
Dagger Hilt - "Cannot create an instance of ViewModel" when dependency injection is used
I am currently facing an issue with incorporating dependency injection into my app, which I developed using Jetpack Compose.
I have included the following dependencies and plugins for Dagger Hilt:
...
0
votes
1
answer
41
views
How to fix error "KaptWithoutKotlincTask$KaptExecutionWorkAction" when trying to use Hilt?
I'm trying to implement Hilt into my application. However when I try to launch the app I get an error in the build log that says:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure ...
0
votes
0
answers
26
views
Scope same instance of a class to two viewmodels with dagger hilt
I have an issue I could not find an answer to, so here I am.
I have a repository, and I am looking to scope an instance of it to two different viewmodels. When navigating from one screen, that ...
1
vote
0
answers
70
views
How to use Navigation Compose new features in Hilt Navigation Compose?
I just read that we can use type safety in Navigation Compose if we update to version 2.8.0. But how about Hilt Navigation Compose? I just upgraded to version 1.2.0 but I didn't find the new ...
2
votes
1
answer
46
views
How to communicate the progress of a running foreground service to a composable?
I am looking for a way to return real time progress to my UI when my service is running, currently I'm using a shared hilt viewModel both for progress % and for the result but injecting into Service ...
1
vote
1
answer
230
views
KSP error when upgrading Android project to Compose Compiler 2.0.0
I am upgrading my project to use Kotlin 2.0.0 with the Compose Compiler of the same version. I ran the AGP upgrade assistant which upgraded the Gradle version to 8.7 and the com.android.application ...
1
vote
1
answer
92
views
Jetpack Compose Hilt Inject ViewModel creation error with Jetpack Compose
I am working with Android 14 api, Kotlin 2.0.0 and I'm using Hilt for dependency injection.
What is wrong with my Hilt config that is preventing the creation of the FirstViewModel?
I get the following ...
0
votes
1
answer
126
views
How to fix "MainActivity does not implement interface dagger.hilt.internal.GeneratedComponent"
I am having trouble with Dagger Hilt in my Android application. Although I have implemented the required components, the app still throws an IllegalStateException. Below are the details of my ...
0
votes
3
answers
104
views
Android getting error Hilt when running app
I am getting this error while running my android project, can someone please help.
I have the latest android studio jellyfish installed
and i am using hilt version 2.51.1
error: [Hilt]
Unsupported ...
0
votes
1
answer
87
views
Error in Jetpack compose when injecting viewModel in Main Activity
I am getting below exception while running the app.
FATAL EXCEPTION: main (Ask Gemini)
Process: com.nishant.comicslibrary, PID: 29957
ava.lang.IllegalArgumentException: CreationExtras must have a ...
3
votes
1
answer
129
views
How to navigate to different destinations for responsive UIs with Jetpack Compose Navigation?
I'd like to display a full screen content for compact screens and show the same content as a dialog for larger screens sizes.
In addition to that I would like to have a ViewModel that is scoped to ...