You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated dagger from 2.24 to 2.25.2 and tried removing @JvmStatic in kotlin object based modules. It works fine in all cases except this one. It fails with "error: non-static method provideSpanCount() cannot be referenced from a static context".
Note: @BindsInstance would work but the actual implementation of provideSpanCount takes context and returns a value at runtime. This example is just to reproduce.
@Module
object AppModule {
@Provides
fun provideSpanCount() : Int = 10
}
class SampleApp : DaggerApplication() {
@Inject
@JvmField
var count : Int = 0
}
The text was updated successfully, but these errors were encountered:
Updated dagger from 2.24 to 2.25.2 and tried removing @JvmStatic in kotlin object based modules. It works fine in all cases except this one. It fails with "error: non-static method provideSpanCount() cannot be referenced from a static context".
Note: @BindsInstance would work but the actual implementation of provideSpanCount takes context and returns a value at runtime. This example is just to reproduce.
The text was updated successfully, but these errors were encountered: