Giter VIP home page Giter VIP logo

Comments (12)

wangmin666 avatar wangmin666 commented on June 4, 2024 1

@blundell Use hilt higher version 2.50,i have checked it. But u should do another hilt config, becaue higher hilt may by cover ohter's annotation.

confit like this
hilt {
enableExperimentalClasspathAggregation = true
enableAggregatingTask = false
}

from arouter.

wangmin666 avatar wangmin666 commented on June 4, 2024

use kapt replace arguments:
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}

from arouter.

mistermingming avatar mistermingming commented on June 4, 2024

use kapt replace arguments: kapt { arguments { arg("AROUTER_MODULE_NAME", project.getName()) } }

试了好像不行啊,有人试过了吗

from arouter.

blundell avatar blundell commented on June 4, 2024

@mistermingming pls show your build.gradle that declares kapt { arguments {

and what version of the plugin: com.google.dagger.hilt.android are you using? I could reproduce the error with 2.48.1, but it works ok with 2.44.2

from arouter.

wangmin666 avatar wangmin666 commented on June 4, 2024

@blundell hilt version: 2.44,i have replaced all 'annotationProcessorOptions' with 'kapt'. I will try with verion 2.48.1 later.

from arouter.

wangmin666 avatar wangmin666 commented on June 4, 2024

@mistermingming replaced all java annotations with kapt and build again ?

from arouter.

wangmin666 avatar wangmin666 commented on June 4, 2024

@blundell @jack-alon I could reproduce with hilt 2.46, but it works 2.44. Have u fixed this?

from arouter.

blundell avatar blundell commented on June 4, 2024

No, we are also stuck on 2.44 for now (assuming that's the issue, still not 100% certain)

from arouter.

blundell avatar blundell commented on June 4, 2024

I think I found the cause, in Hilt v2.45: google/dagger#3546 / google/dagger#3658

not figured out the solution yet :-)

Made a simple reproduction project: https://github.com/blundell/ARouterHiltIssue

This is the least code needed to reproduce this issue.

It appears, whatever the change was, was introduced in Hilt 2.46

from arouter.

blundell avatar blundell commented on June 4, 2024

@blundell Use hilt higher version 2.50,i have checked it. But u should do another hilt config, becaue higher hilt may by cover ohter's annotation.

Yes the reproducer project uses Hilt: 2.51.1 : https://github.com/blundell/ARouterHiltIssue/blob/main/gradle/libs.versions.toml#L5

config like this
hilt {
enableExperimentalClasspathAggregation = true
enableAggregatingTask = false
}

Thanks I've just tried that.

Using only:

    hilt {
        enableAggregatingTask = false
    }

the reproducer project build succeeds! 🎉 🙇‍♂️

from arouter.

wangmin666 avatar wangmin666 commented on June 4, 2024

@blundell Good job!✈✈

from arouter.

superoidlau avatar superoidlau commented on June 4, 2024

@blundell Use hilt higher version 2.50,i have checked it. But u should do another hilt config, becaue higher hilt may by cover ohter's annotation.

confit like this

hilt {
enableExperimentalClasspathAggregation = true
enableAggregatingTask = false
}

Thank you , this is the final solution.

from arouter.

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.