Android introduces the Lombok framework

  1. Install plug-ins in AS

Under Android Studio, go to setting->Plugins, search for Lombok on the right, then click Install and restart Android Studio

  1. Add the following dependencies in build.gradle under app

    compileOnly ‘org.projectlombok:lombok:1.18.16’
    annotationProcessor ‘org.projectlombok:lombok:1.18.16’

    testCompileOnly ‘org.projectlombok:lombok:1.18.16’
    testAnnotationProcessor ‘org.projectlombok:lombok:1.18.16’

Guess you like

Origin blog.csdn.net/weixin_51966599/article/details/127690053