无法使用 Lombok 插件安装 apk

Unable to install apk with Lombok plugin

我已将我的应用构建工具更新到 28.0.0。由于以下错误,应用程序无法安装到设备:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'

如果我删除 Lombok 依赖项,那么一切都会正常运行。

我似乎无法弄清楚问题出在哪里,也无法在线找到有关此问题的信息。有什么想法吗?

我的应用程序 gradle 配置:'

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "my.package.budgeter"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '28.0.2'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    compileOnly 'org.projectlombok:lombok:1.18.2'
    annotationProcessor 'org.projectlombok:lombok:1.18.2'
}

发现1.18.2版本有问题。 回滚到版本 1.16.20。这解决了问题。