In a project where I'm currently working on I've experienced some unchecked warnings related to Dagger 2.
To exclude project related factors I've tried compiling the Dagger 2 examples provided on GitHub and they are also causing these unchecked warnings. See below.
/MY_DIRECTORY/../DaggerApplicationComponent.java:28: warning: [unchecked] unchecked conversion
this.demoApplicationMembersInjector = DemoApplication_MembersInjector.create((MembersInjector) MembersInjectors.noOp(), provideLocationManagerProvider);
required: MembersInjector
<Application>
found: MembersInjector
Apparently the create method requires an MembersInjector<Application>
but Dagger 2 casts the passed object to an MembersInjector by default.
I would like fix these issues so that the logs remain clean and the buildserver compiles the project again.
Some settings I'm using:
I tried to upgrade Dagger to latest version 2.19
, and the issue has gone.
See more: https://github.com/google/dagger/releases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With