Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Hilt后添加ARouter编译会报错 #884

Closed
TungHongChao opened this issue Dec 23, 2020 · 6 comments
Closed

使用Hilt后添加ARouter编译会报错 #884

TungHongChao opened this issue Dec 23, 2020 · 6 comments

Comments

@TungHongChao
Copy link

我先集成了Hilt框架,然后准备再集成ARouter,项目sync没有问题,但是run的时候会报错
主要是添加了这个就会报错
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}

D:\WorkSpace\Android\TdTools\app\build\tmp\kapt3\stubs\debug\com\tdtech\tdlog\module\main\MainActivity.java:7: ����: [Hilt]
public final class MainActivity extends com.tdtech.base.ui.BaseActivity<com.tdtech.tdlog.module.main.MainFragment> {
^
Expected @androidentrypoint to have a value. Did you forget to apply the Gradle Plugin? (dagger.hilt.android.plugin)
See https://dagger.dev/hilt/gradle-setup.html
[Hilt] Processing did not complete. See error above for details.D:\WorkSpace\Android\TdTools\app\build\tmp\kapt3\stubs\debug\com\tdtech\tdlog\module\main\MainFragment.java:7: ����: [Hilt]

@l7356507
Copy link

我也遇到了同样的问题 请问有解决办法吗?

@l7356507
Copy link

问题解决了, arguments 后面使用 +=

@TungHongChao
Copy link
Author

好的,回头我也试一试

@zhi1ong zhi1ong closed this as completed Jan 4, 2021
@yangjiannan2018
Copy link

yangjiannan2018 commented Mar 19, 2021

问题解决了, arguments 后面使用 +=

为啥我 += 没用

@yangjiannan2018
Copy link

问题解决了, arguments 后面使用 +=

为啥我 += 没用

解决了,是因为 kotlin 混编导致的,按照 ARouter 的 kotlin项目的配置即可

@zhaoxiuyu
Copy link

按照kotlin项目的配置还是不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants