Coder Social home page Coder Social logo

Comments (6)

manuelvicnt avatar manuelvicnt commented on September 26, 2024 1

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.

manuelvicnt avatar manuelvicnt commented on September 26, 2024

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.

titovnick avatar titovnick commented on September 26, 2024

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.

titovnick avatar titovnick commented on September 26, 2024

Yes, it works for dagger right now. Will try with 'api' and will write you back

from codelab-android-hilt.

titovnick avatar titovnick commented on September 26, 2024

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.

manuelvicnt avatar manuelvicnt commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.