Closed Premjit-Developer closed 10 months ago
Hmm, the error message is saying that Dagger cannot resolve UserSettings
, which it needs in order to process UserSettingsDataSource
and DataStoreModule
. Typically, this is caused by one of the following reasons:
build.gradle
in Gradle) is missing a dependency on the unresolvable class,import
for the unresolvable class,However, I'm not sure why upgrading to kotlin 1.9 would have triggered this issue. Unfortunately, I'm not sure that there's anything we can do about this on Dagger's side. Whether a type is resolvable is really out of Dagger's control -- it's typically controlled by the user (e.g. by adding api
or implementation
dependencies in build.gradle
). If everything looks fine from your side (e.g. you've checked that none of the above reasons apply) then it may be that Gradle toolchain for kotlin 1.9 is somehow messing up the classpath.
If you can provide a minimal reproducible example project then we could try to look into this more.
I ran into the same issue, when trying to provide DataStores backed by protobuf through Dagger/Hilt, which seems to match what you're doing according to your dependency traces.
Updating the protobuf dependencies to 3.24.1
and protobuf plugin to 0.9.4
seemed to do the trick for me. So this is not an issue on Dagger's side.
If you are in fact not using protobuf with your DataStores, but rather the preferences datastore, I would still suggest updating that dependency to see if it resolves your issue.
Just thought I'd add that bumping to 3.24.1
& 0.9.4
worked for me as well when I ran into this, I think this can be closed.
Yes when bumping to 3.24 protobuf version it solved the issue. thanks @omiwrench