我在安卓系统上有一个Fragment版的Dagger2 Component。我通过动态注入片段来初始化组件。现在,我需要为片段模块中的依赖项提供活动上下文。我假设使用片段作为参数编写提供者方法会自动获得模块中的片段引用,并且我可以从中提取上下文。但是我无法编译我的代码。编译错误:
[Dagger/MissingBinding] MyFragment ca
我正在努力将我的API服务提供到FragmentModule中,但它的工作方式与我设置依赖项注入的方式不同,我收到了一个MissingBiding错误,尽管我已经将相应的模块包括到FragmentModule/MissingBinding
C:\MyApplication_HiltComponents.java:168: error: [Dagger/MissingBinding] MyApplicationcannot be provided without an @Inject c
我对Dagger/MissingBinding.I /MissingBinding.I有意见,我在堆栈溢出上列出了所有相关的答案。他们没有解决我的问题。错误看起来如下:
error: [Dagger/MissingBinding] SwipeRepository cannot be provided without an @Provides-annotatedclasspath "org.jetbrains.ko
ViewModelInject,一切都正常,但是现在@ViewModelInject不再受欢迎,我将@ViewModelInject更改为@HiltViewModel + @Inject构造函数(),并面对error: [Dagger/MissingBinding] *.AuthRepository cannot be provided without an @Provides-annotated method.,我试图在接口中为寄存器函数添加一个@Provides注释,但是遇到了另一个错误。
任务执行失败:a
现在声称缺少一个绑定,我需要声明一个@Provides注释的方法:
error: [Dagger/MissingBinding] com.myapp.core.domain.usecase.NoParamUseCaseextends com.myapp.core.tracking.UserTrackingPropertiesResult> cannot be provided without an @Provides-annotatedcom.myapp.tasks.tracking.domain.usec
我已经设置好了,我似乎无法绕过这个错误: 如果没有@Provides注释的方法,则无法提供Dagger/MissingBinding @dagger.hilt.android.qualifiers.ApplicationContext@dagger.hilt.android.qualifiers.ApplicationContext android.content.Context is i
我在我的多模块安卓应用程序中实现了Hilt,并且无法提供/注入SQLiteDatabase (我试图在发布之前寻求帮助,但没有发现关于SQLiteDatabase的任何信息)。/MissingBinding] android.database.sqlite.SQLiteDatabase cannot be provided without an @Inject constructoror an @Provides-annotated method.我被困住了,我不知道如何向存储库<em
Hilt指出,如果没有@Provides注释,就不能提供这个接口: fun getAllLists(): LiveData<List,我可以使用@Binds来告诉Dagger应该接收哪个实现。repository: PlannedListRepository那么,我应该做些什么来修复错误呢?\planshopping\PlannerApplication_
我正在试验匕首子组件,并得到一个错误,我有一些困难的理解。如果没有@Inject构造函数或@ 注释的方法,就不能提供Dagger/MissingBinding。com.vgrec.daggerkurs.components.LoginActivity)注入
这部分:FeatureStorage cannot be provided without an @Inject cons