1,488 questions
1
vote
0
answers
98
views
@HiltAndroidApp and InstrumentationTests: getting error Hilt test, [..] cannot use a @HiltAndroidApp application
We have an application class which doesn't have any hilt-inject dependencies but contains quite some initialization stuff which is legacy from before we started using hilt (it's slowly being removed):
...
0
votes
0
answers
87
views
Hilt Aggregation on multiple module
I am working on a large project with over 200 modules, and each module has its own Hilt module with @InstallIn(SingletonComponent::class). While analyzing the CI logs, I noticed that a large number of ...
0
votes
0
answers
324
views
GitLab CI/CD: Authentication Failed When Using Personal Access Token (PAT) in .gitlab-ci.yml
Need help with configuring my .gitlab-ci.yml. I am currently getting following error
remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or ...
1
vote
1
answer
97
views
Wait for postgres service to start in dagger
I am using dagger wherein I am writing code using golang sdk.
I want to perform integration testing for which I would need to start a postgres service. Once the postgres service is up I would want to ...
-1
votes
1
answer
238
views
How to add Kotlin-kapt plugin in android studio Koala | 2024.1.1 Patch 2
I am using android studio version Koala | 2024.1.1 Patch 2. I am trying to add kapt plugin for dagger hilt .Please help me regarding how to add kapt plugin in project root level and module level. and ...
0
votes
1
answer
570
views
How to Implement Dependency Injection Using Dagger or Hilt in Android Kotlin for API Fetching?
I'm building an Android app in Kotlin and want to implement Dependency Injection (DI) using either Dagger or Hilt. My use case involves fetching data from a REST API using Retrofit.
I’m looking for a ...
0
votes
1
answer
163
views
How do I order Dagger multibindings?
For example, there's need to provide a set of bindings somewhere:
class Farm @Inject constructor(
private val animals: Set<@JvmSuppressWildcards Animal>,
){
init {
animals....
0
votes
1
answer
81
views
ClassCastException with Hilt when trying to inject ViewModel in FavoriteActivity
I’m encountering a ClassCastException error when trying to inject FavoriteViewModel with Hilt in FavoriteActivity. Here’s the full error message:
java.lang.RuntimeException: Unable to start activity ...
0
votes
1
answer
101
views
Kotlin gradle error while adding kapt and dagger hilt
Hi have a problem in gradle error message:
Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner....
1
vote
0
answers
52
views
Android Hilt pass Activity/intentExtras in Singleton Provide function
I'm new to Hilt/Dagger. I have an existing project with a Singleton, and I need a parameter from the caller app stored in intent extras:
@Module
@InstallIn(SingletonComponent::class)
class MyModule
{
...
1
vote
0
answers
170
views
Android Dagger hilt classCastException
When I apply obfuscat,
I was able to check the following error.
What should I do?
java.lang.RuntimeException: Unable to create application kr.co.test.TestApplication: java.lang.ClassCastException: kr....
0
votes
1
answer
113
views
Android Manifest Merger fails for Android:Name attribute under Application
I am writing an app where a host application, lets call it the base App, calls and navigates to an activity in a different module. This module is an Android Library with its own custom application ...
4
votes
1
answer
1k
views
Error with Dagger Hilt in Android Project: Unable to process HiltComponents.SingletonC
I am working on an Android project that hasn't been touched in some time. The previous developer left a few years ago and did not leave any documentation. I have looked through the Hilt dependency ...
0
votes
1
answer
95
views
Why is my room database data non persistent?
I have an android app that uses room database and dagger. I tried all the answers I found on the internet, and this is my last resort as I'm on the week 2 of solving this problem.
My Setup:
com....
0
votes
1
answer
193
views
Dagger Hilt Incompatibility with Dependency Inversion
In an Android project structured to follow the Dependency Inversion Principle (DIP) as outlined in the Android Developer's guide on modularization patterns, I've encountered a challenge with Dagger ...