androidannotations-dagger-example
全部标签 我正在一个Android项目中使用Kotlin测试Dagger2。我受到AndroidCleanArchitecture的启发repo。我的gradle构建中有两个模块,一个是“应用程序”,一个是“模块”。模块包含一个类调用模型。在我的应用程序gradle模块中,我使用模型提供程序创建了一个名为“DaggerModule”的dagger模块。当我尝试构建项目时,出现编译错误:DaggerModule.kt:(3,57):Unresolvedreference:ModelDaggerModule.kt:(9,34):Unresolvedreference:ModelDaggerModul
我正在一个Android项目中使用Kotlin测试Dagger2。我受到AndroidCleanArchitecture的启发repo。我的gradle构建中有两个模块,一个是“应用程序”,一个是“模块”。模块包含一个类调用模型。在我的应用程序gradle模块中,我使用模型提供程序创建了一个名为“DaggerModule”的dagger模块。当我尝试构建项目时,出现编译错误:DaggerModule.kt:(3,57):Unresolvedreference:ModelDaggerModule.kt:(9,34):Unresolvedreference:ModelDaggerModul
我有一个符合HasDispatchingActivityInjector的Application子类,但是当我尝试运行我的应用程序时,它会崩溃,说:UnabletostartactivityComponentInfo{com.test.testing/com.test.testing.ui.main.MainActivity}:java.lang.RuntimeException:android.app.Applicationdoesnotimplementdagger.android.HasDispatchingActivityInjector这是我的应用程序子类:classMyAp
我有一个符合HasDispatchingActivityInjector的Application子类,但是当我尝试运行我的应用程序时,它会崩溃,说:UnabletostartactivityComponentInfo{com.test.testing/com.test.testing.ui.main.MainActivity}:java.lang.RuntimeException:android.app.Applicationdoesnotimplementdagger.android.HasDispatchingActivityInjector这是我的应用程序子类:classMyAp
最近我在Kotlin中遇到了@Named限定符的问题。我认为从这个改变:varboldTypeface:Typeface?=null[Inject]set进入这个varboldTypeface:Typeface?=null[InjectNamed("bold")]set或varboldTypeface:Typeface?=null[Inject][Named("bold")]set会解决我的问题。但它没有,它甚至没有编译。 最佳答案 我不得不更新我的答案,因为Kotlin改进了很多。现在我正在使用Kotlin1.0beta3要为一个
最近我在Kotlin中遇到了@Named限定符的问题。我认为从这个改变:varboldTypeface:Typeface?=null[Inject]set进入这个varboldTypeface:Typeface?=null[InjectNamed("bold")]set或varboldTypeface:Typeface?=null[Inject][Named("bold")]set会解决我的问题。但它没有,它甚至没有编译。 最佳答案 我不得不更新我的答案,因为Kotlin改进了很多。现在我正在使用Kotlin1.0beta3要为一个
我有这个依赖:@SingletonclassSpiceMix@Injectconstructor(@field:[Named("oregano")]privatevaloregano:Spice,@field:[Named("sage")]privatevalsage:Spice,@field:[Named("rosemary")]privatevalrosemary:Spice)还有一个模块来实现它的依赖:@ModuleclassSpiceModule{@Provides@Named("oregano")@SingletonfunprovideOregano():Spice=Oreg
我有这个依赖:@SingletonclassSpiceMix@Injectconstructor(@field:[Named("oregano")]privatevaloregano:Spice,@field:[Named("sage")]privatevalsage:Spice,@field:[Named("rosemary")]privatevalrosemary:Spice)还有一个模块来实现它的依赖:@ModuleclassSpiceModule{@Provides@Named("oregano")@SingletonfunprovideOregano():Spice=Oreg
从Kotling1.3.21更新到1.3.30后生成错误:AppComponent.java:16:error:[Dagger/MissingBinding]java.util.Map,javax.inject.Provider>cannotbeprovidedwithoutan@Provides-annotatedmethod.在对Kotlin、Dagger和Architecture组件具有相似依赖关系的两个不同项目中重现。我怀疑它与kotlin1.3.30中最近的kapt更新有某种关系:https://blog.jetbrains.com/kotlin/2019/04/kotlin
从Kotling1.3.21更新到1.3.30后生成错误:AppComponent.java:16:error:[Dagger/MissingBinding]java.util.Map,javax.inject.Provider>cannotbeprovidedwithoutan@Provides-annotatedmethod.在对Kotlin、Dagger和Architecture组件具有相似依赖关系的两个不同项目中重现。我怀疑它与kotlin1.3.30中最近的kapt更新有某种关系:https://blog.jetbrains.com/kotlin/2019/04/kotlin