gpt4 book ai didi

android - App_HiltComponents.ActivityC 范围为 @dagger.hilt.android.scopes.ActivityScoped 可能不会引用具有不同范围的绑定(bind)

转载 作者:行者123 更新时间:2023-12-04 16:39:59 25 4
gpt4 key购买 nike

将 Dagger-android 更改为 Hilt 后,出现以下错误。

  @Provides @Singleton @org.jetbrains.annotations.NotNull retrofit2.converter.gson.GsonConverterFactory com.zhixin.wedeep.common.di.NetWorkModule.provideGsonConverterFactory(com.google.gson.Gson)
@Provides @Singleton @org.jetbrains.annotations.NotNull com.google.gson.Gson com.zhixin.wedeep.common.di.NetWorkModule.provideGson()
@Singleton @Provides @org.jetbrains.annotations.NotNull com.zhixin.wedeep.homepage.data.dao.CommentDao com.zhixin.wedeep.homepage.data.di.HomePageDataModule.provideCommentDao(com.zhixin.wedeep.homepage.data.HomePageDatabase)
@Singleton @Provides @org.jetbrains.annotations.NotNull com.zhixin.wedeep.homepage.data.HomePageDatabase com.zhixin.wedeep.homepage.data.di.HomePageDataModule.provideHomePageDatabase(android.app.Application)
@Singleton @Provides @org.jetbrains.annotations.NotNull com.zhixin.wedeep.homepage.data.dao.CompositionDao com.zhixin.wedeep.homepage.data.di.HomePageDataModule.provideCompositionDao(com.zhixin.wedeep.homepage.data.HomePageDatabase)
@Singleton @Provides @org.jetbrains.annotations.NotNull com.zhixin.wedeep.homepage.data.dao.CompositionsDao com.zhixin.wedeep.homepage.data.di.HomePageDataModule.provideBriefCompositionDao(com.zhixin.wedeep.homepage.data.HomePageDatabase) [com.zhixin.wedeep.main.App_HiltComponents.ApplicationC �� com.zhixin.wedeep.main.App_HiltComponents.ActivityRetainedC �� com.zhixin.wedeep.main.App_HiltComponents.ActivityC]
谁对这个问题有想法?

最佳答案

我也是 HILT 的新手,我遇到了这种错误。我猜你用@Singleton 提供对象请删除这个注释

关于android - App_HiltComponents.ActivityC 范围为 @dagger.hilt.android.scopes.ActivityScoped 可能不会引用具有不同范围的绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62886908/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com