Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger2 or Hilt, AssistedInject not working in multimodule application #2364

Closed
TheReprator opened this issue Feb 6, 2021 · 2 comments
Closed

Comments

@TheReprator
Copy link

TheReprator commented Feb 6, 2021

Hi Mates,

Actually i am trying to use assistedinject in a multimodule application but getting the following error as follows,

C:\WillyWeather\ui\cityList\build\generated\source\kapt\debug\reprator\willyWeather\cityList\ui\CityListAdapterFactory_Impl.java:24: error: incompatible types: Factory<CityListAdapterFactory_Impl> cannot be converted to Provider
return InstanceFactory.create(new CityListAdapterFactory_Impl(delegateFactory));

Repo details: https://github.com/TheReprator/WillyWeather
Branch: hilt

It's somewhat related to , #2309

Regards,
Vikram Singh

@TheReprator
Copy link
Author

Just worked after adding,

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

in module build.gradle

@bcorso
Copy link

bcorso commented Feb 6, 2021

This should also be fixed at head (dupe of #2309), but you'll have to wait for the next Dagger release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants