Comments (6)
That might be the issue, try with api project(':api')
AGP doesn't give Hilt or Dagger enough information for the annotation processor so api
needs to be used. This is currently under investigation and the team plans to improve it. Was implementation
working with Dagger?
from codelab-android-hilt.
It seems like there's a problem with Dex files. Are you using multidex in your app? I assume that you have the LocationOwner
as a transitive dependency of the app
module, right? You're importing the other module as api
and not implementation
.
from codelab-android-hilt.
Thanks for your answer! This particular interface live in the API module and as far as I can see it is being imported with implementation project(':api')
. We do use Multidex, but as minSdk is 21, we do not use support multidex.
from codelab-android-hilt.
Yes, it works for dagger right now. Will try with 'api' and will write you back
from codelab-android-hilt.
Okay, with api project(':module')
it works, but had to replace two or three in order to make it work. Why do you think it works for Dagger but not for Hilt? Thanks for your help, will never figure it out myself.
from codelab-android-hilt.
I'm surprised that it worked for Dagger, to be honest. Not sure if it wasn't picking up the right implementation or what but we've seen problems like it in the past with Dagger.
This is a known problem that the team is trying to fix as using api
in these cases is not a good practice. Hope it gets fixed in the upcoming released. Stay tuned :)
from codelab-android-hilt.
Related Issues (20)
- ':app:lintVitalReleasePro'.
- Using Hilt in Libraries or SDK HOT 3
- Hi! I believe you have to use the same version in the libraries and the gradle plugin. Can you try with: HOT 4
- Question: Meaning of Destroyed
- Codelab is not build : java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext
- Typo in comment for database table name
- Does hilt compatible with JAVA 11. HOT 1
- SavedStateViewModelFactory constructed with empty constructor supports only calls to create(modelClass: Class<T>, extras: CreationExtras). HOT 1
- Binds and scope annotations
- Exception when running instrumented tests with Hilt and App Startup HOT 1
- Problem injecting generics
- Fields in View injected twice
- nuke word in nukeTable method name sounds exaggerated
- Problem in UI Test (even solution branch error)
- ActivityNotFoundException when running AppTest#happyPath
- Bump up versions for solution branch
- How to use hilt in projects built with build.gradle.kts
- compile time error: The following options were not recognized by any processor: '[kapt.kotlin.generated, room.incremental]'
- DaggerXYZApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get
- Hilt +ViewBinding Cannot add a null child view to a ViewGroup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codelab-android-hilt.