AS加入lomBok依赖

1 引入包
在app下的build.gradle配置如下:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'org.projectlombok:lombok:1.18.10'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

在这里插入图片描述
然后继续在该文件中加入:

    defaultConfig {
        applicationId "com.wuk.runtimepermissiontest"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true }}
    }

在这里插入图片描述然后在项目的根目录加入:
在这里插入图片描述
lombok.config内容如下:

lombok.anyConstructor.suppressConstructorProperties=true
config.stopBubbling=true
lombok.equalsAndHashCode.callSuper=call
发布了157 篇原创文章 · 获赞 77 · 访问量 15万+

猜你喜欢

转载自blog.csdn.net/wu2374633583/article/details/103010735