Dagger2 generated class is all of a sudden missing from Android Studio

。_饼干妹妹 提交于 2019-11-30 06:43:56

So it looks like for some reason there are no more underscores in names of generated component classes. Just look into yours build/generated/source/apt folder to see it really changed this way.

Fix it by replacing Dagger_Injector with DaggerInjector etc.

In My case I was using realm and due to apt mismatch I was not being able to get the autogenerated DaggerComponent.

I replaced

classpath "io.realm:realm-gradle-plugin:1.2.0"

with

classpath "io.realm:realm-gradle-plugin:3.1.2"

and applied the plugin

apply plugin: 'realm-android'

in app-level gradle file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!