on dagger2 home page, it suggest use the annotation @FragmentKey to inject Fragment. But this Fragment is under the package android.app , but we usually use the Fragment that was under the package android.support.v4.app, so, how to fix this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The dagger.android.support
library is designed for this. See the user guide (under "Android" -> "Support Libraries"), the javadoc, and the code.