Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All 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 ...
Hey_Viswa's user avatar
-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: ...
Chris Pi's user avatar
  • 582
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 ...
Nanda Z's user avatar
  • 1,806
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 ...
hieuwu's user avatar
  • 33
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: ...
StarChild's user avatar
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 ...
Bob Rasner's user avatar
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 ...
semicn's user avatar
  • 13
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 ...
The One's user avatar
  • 81
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 ...
fri3erg's user avatar
  • 23
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 ...
codejockie's user avatar
  • 10.5k
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 ...
succeed's user avatar
  • 981
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 ...
Huỳnh Đức Phú's user avatar
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 ...
Sanchay Saxena's user avatar
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 ...
Nishant's user avatar
  • 32.2k
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 ...
Victor Shpyrka's user avatar

15 30 50 per page
1
2 3 4 5
16