使用JAR文件的Gradle的Annotation Processor依赖性
我正在将匕首整合到我的项目中,并且遇到了这个问题。
我想添加jar依赖项,而不是像
`annotationProcessor "com.google.dagger:dagger-compiler:2.41"`
下面的
entotationProcessor文件('libs/dagger-compiler-2.41.jar')
,但是当我编译时,它会使我的错误
执行失败''。
匕首/spi/shaded/androidx/room/compiler/processing/javac/javacbasicantationProcessor 引起:java.lang.noclassdeffounderror:匕首/spi/shaded/androidx/room/compiler/compiler/processing/javac/javacbasicantationProcesso
:当我使用AnnoTationProcessor时,“ com.google.google.dagger:匕首 - 编译器:2.41”
一切正常。
implementation files('libs/javax.inject-1.jar')
implementation files('libs/dagger-2.41.jar')
implementation files('libs/dagger-producers-2.41.jar')
I am integrating dagger in my project and I am having this issue.
I want to add jar dependencies instead of
`annotationProcessor "com.google.dagger:dagger-compiler:2.41"`
like below
annotationProcessor files('libs/dagger-compiler-2.41.jar')
but when I compile, it gives me error
Execution failed for task ''.
dagger/spi/shaded/androidx/room/compiler/processing/javac/JavacBasicAnnotationProcessor
Caused by: java.lang.NoClassDefFoundError: dagger/spi/shaded/androidx/room/compiler/processing/javac/JavacBasicAnnotationProcesso
It is working with other jar daggger dependency but not with AnnotationProcessor. When I use annotationProcessor "com.google.dagger:dagger-compiler:2.41"
everything works fine.
implementation files('libs/javax.inject-1.jar')
implementation files('libs/dagger-2.41.jar')
implementation files('libs/dagger-producers-2.41.jar')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大量的研究和命中和试验以及大量尝试,我能够将达格格(Daggger)与我在Gradle和Android MK中的项目集成在一起。
对于gradle:在API 28和30工作
After so much of research and hit and trial and lot of trying I was able to integrate daggger to my Project in gradle as well as in android MK.
For Gradle : Worked for both API 28 and 30