enable Annotation Processors option in Android Studio 2.2

后端 未结 10 1418
逝去的感伤
逝去的感伤 2020-12-03 00:58

I\'m trying to use java 8 in my project and for that I added the jack compiler.

After enabling jack I started having problems with libraries that use Annotation Proc

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 01:08

    This Answer for those who face this problem in the future

    For Kotlin

    Add kapt plugin

    apply plugin: 'kotlin-kapt'
    implementation 'com.google.dagger:dagger:2.21'
    kapt 'com.google.dagger:dagger-compiler:2.21'
    

    For Java

    implementation 'com.google.dagger:dagger:2.21'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.21'
    

提交回复
热议问题