根源编译匕首2注入组件

问题描述 投票:0回答:1

我在编译项目时遇到以下错误:

> Task :app:kaptDebugKotlin FAILED
e: .../di/component/AppComponent.java:20: error: @Component.Builder is missing setters for required modules or components: [...di.modules.AppModule]
    public static abstract interface Builder {
                           ^
w: [kapt] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: dagger.internal.codegen.ComponentProcessor (NON_INCREMENTAL), dagger.android.processor.AndroidProcessor (NON_INCREMENTAL), com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor (NON_INCREMENTAL).

FAILURE: Build failed with an exception.

我在其他项目中使用此配置之前,因此我怀疑有一个隐藏的原因正在破坏Dagger编译。如何提取有关此错误的更多信息?我为此错误尝试了流行的解决方案,但结果是相同的。

android dependency-injection dagger-2
1个回答
0
投票

检查您的component.builder和组件创建。这两个应该匹配,但在您的情况下可能不匹配。在此处搜索错误案例。链接可能会有用Dagger 2: @Component.Builder is missing setters for required modules or components: [appi.example.com.dagger.AppModule]`

© www.soinside.com 2019 - 2024. All rights reserved.