我在我之前的帖子中被一个关于使用firebase firestore数据库的社区成员推荐下载一个名为make-it-so的应用程序,它使用firestore数据库,以便了解它是如何工作的。我已经尝试了几次让应用程序工作,但我一直得到这个错误,知道为什么吗?任何帮助都非常感谢!
错误消息:https://gyazo.com/8b8d41eddc9b176c376b3e98c2c249e7
error: InjectProcessingStep was unable to process 'AccountServiceImpl(com.google.firebase.auth.FirebaseAuth)' because 'User' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.impl.AccountServiceImpl
=> element (METHOD): getCurrentUser()
=> type (EXECUTABLE method): ()kotlinx.coroutines.flow.Flow<User>
=> type (DECLARED return type): kotlinx.coroutines.flow.Flow<User>
=> type (ERROR type argument): User
If type 'User' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'User' is on your classpath.
error: InjectProcessingStep was unable to process 'SplashViewModel(ConfigurationService,com.example.makeitso.model.service.AccountService,com.example.makeitso.model.service.LogService)' because 'ConfigurationService' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.screens.splash.SplashViewModel
=> element (CONSTRUCTOR): SplashViewModel(ConfigurationService,com.example.makeitso.model.service.AccountService,com.example.makeitso.model.service.LogService)
=> type (EXECUTABLE constructor): (ConfigurationService,com.example.makeitso.model.service.AccountService,com.example.makeitso.model.service.LogService)void
=> type (ERROR parameter type): ConfigurationService
If type 'ConfigurationService' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationService' is on your classpath.
error: InjectProcessingStep was unable to process 'TasksViewModel(com.example.makeitso.model.service.LogService,com.example.makeitso.model.service.StorageService,ConfigurationService)' because 'ConfigurationService' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.screens.tasks.TasksViewModel
=> element (FIELD): configurationService
=> type (ERROR field): ConfigurationService
If type 'ConfigurationService' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationService' is on your classpath.
error: ModuleProcessingStep was unable to process 'com.example.makeitso.model.service.module.ServiceModule' because 'ConfigurationServiceImpl' could not be resolved.
InjectProcessingStep was unable to process 'AccountServiceImpl(com.google.firebase.auth.FirebaseAuth)' because 'User' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.module.ServiceModule
=> element (METHOD): provideConfigurationService(ConfigurationServiceImpl)
=> type (EXECUTABLE method): (ConfigurationServiceImpl)ConfigurationService
=> type (ERROR parameter type): ConfigurationServiceImpl
If type 'ConfigurationServiceImpl' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationServiceImpl' is on your classpath.
error: BindingMethodProcessingStep was unable to process 'provideAccountService(com.example.makeitso.model.service.impl.AccountServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.module.ServiceModule
=> element (METHOD): provideConfigurationService(ConfigurationServiceImpl)
=> type (EXECUTABLE method): (ConfigurationServiceImpl)ConfigurationService
=> type (ERROR parameter type): ConfigurationServiceImpl
If type 'ConfigurationServiceImpl' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationServiceImpl' is on your classpath.
error: BindingMethodProcessingStep was unable to process 'provideLogService(com.example.makeitso.model.service.impl.LogServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.module.ServiceModule
=> element (METHOD): provideConfigurationService(ConfigurationServiceImpl)
=> type (EXECUTABLE method): (ConfigurationServiceImpl)ConfigurationService
=> type (ERROR parameter type): ConfigurationServiceImpl
If type 'ConfigurationServiceImpl' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationServiceImpl' is on your classpath.
error: BindingMethodProcessingStep was unable to process 'provideStorageService(com.example.makeitso.model.service.impl.StorageServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.module.ServiceModule
=> element (METHOD): provideConfigurationService(ConfigurationServiceImpl)
=> type (EXECUTABLE method): (ConfigurationServiceImpl)ConfigurationService
=> type (ERROR parameter type): ConfigurationServiceImpl
If type 'ConfigurationServiceImpl' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationServiceImpl' is on your classpath.
error: BindingMethodProcessingStep was unable to process 'provideConfigurationService(ConfigurationServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
Dependency trace:
=> element (CLASS): com.example.makeitso.model.service.module.ServiceModule
=> element (METHOD): provideConfigurationService(ConfigurationServiceImpl)
=> type (EXECUTABLE method): (ConfigurationServiceImpl)ConfigurationService
=> type (ERROR parameter type): ConfigurationServiceImpl
If type 'ConfigurationServiceImpl' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'ConfigurationServiceImpl' is on your classpath.
InjectProcessingStep was unable to process 'SplashViewModel(ConfigurationService,com.example.makeitso.model.service.AccountService,com.example.makeitso.model.service.LogService)' because 'ConfigurationService' could not be resolved.
InjectProcessingStep was unable to process 'TasksViewModel(com.example.makeitso.model.service.LogService,com.example.makeitso.model.service.StorageService,ConfigurationService)' because 'ConfigurationService' could not be resolved.
ModuleProcessingStep was unable to process 'com.example.makeitso.model.service.module.ServiceModule' because 'ConfigurationServiceImpl' could not be resolved.
BindingMethodProcessingStep was unable to process 'provideAccountService(com.example.makeitso.model.service.impl.AccountServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
BindingMethodProcessingStep was unable to process 'provideLogService(com.example.makeitso.model.service.impl.LogServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
BindingMethodProcessingStep was unable to process 'provideStorageService(com.example.makeitso.model.service.impl.StorageServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
BindingMethodProcessingStep was unable to process 'provideConfigurationService(ConfigurationServiceImpl)' because 'ConfigurationServiceImpl' could not be resolved.
> Task :app:kaptDevDebugKotlin FAILED
Execution failed for task ':app:kaptDevDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
2条答案
按热度按时间pbwdgjma1#
作为社区wiki回答,正如Alex Mamo在上面的评论中提到的。
如果你想学习如何使用Firestore和Jetpack Compose创建一个简单的应用程序,我认为这个resource肯定会有所帮助。下面是相应的repo。或者你可能会有兴趣阅读这个series。
您可以参考这些Link1和Link2,它们可能会对您有所帮助。
umuewwlo2#
进入项目栏并将Android视图更改为项目
完成后,检查google-services.json文件是否存在,如果不存在,请将其请求给所有者项目,然后它将工作