Is there any way of making IntelliJ IDEA recognizing Dagger 2 generated classes in a Java project?

前端 未结 8 959
抹茶落季
抹茶落季 2020-12-14 16:21

Context

I have started a personal project in java with Gradle as the build system and I want to use Dagger 2 as a DI. The main reason o

8条回答
  •  悲&欢浪女
    2020-12-14 16:37

    you must manually enable the annotation processing in IntelliJ.

    From: Settings --> Build, Execution, Deployment --> Compiler --> Annotation Processors --> Enable annotation processing and Obtain processors from project classpath

    then rebuild the project and you will find the generated classes in the project.

    Please note that I have used this solution in a (java) android project.

提交回复
热议问题