dagger2-使用mvvm实施,错误

时间:2018-09-24 20:52:27

标签: android dagger-2

我收到以下错误,却不知道为什么:

"DailyQuotes/app/build/tmp/kapt3/stubs/debug/quotes/daily/app/dailyquotes/di/AppComponent.java:11: error: @Provides methods can only be present within a @Module or @ProducerModule
    public abstract void inject(@org.jetbrains.annotations.NotNull()"

请参阅我的代码:

interface AppComponent {

    @Component.Builder
    interface Builder {
        @BindsInstance
        fun application(application: Application): Builder

        fun build(): AppComponent
    }

    fun inject(quotesApp: QuotesApp)
}

在此先感谢可以帮助您的人!

0 个答案:

没有答案