错误:注释处理器必须立即显式声明

时间:2018-08-01 11:01:32

标签: android-studio

我在执行该应用程序时遇到错误,该如何解决?

apply plugin: 'com.android.library'

 android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.google.code.gson:gson:2.8.0'
    api 'com.google.firebase:firebase-messaging:11.8.0'
    api 'com.google.android.gms:play-services-maps:11.8.0'
    api 'com.google.android.gms:play-services-location:11.8.0'
    implementation 'de.hdodenhof:circleimageview:2.0.0'
    api 'com.android.support:design:27.1.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
    implementation 'com.github.bumptech.glide:glide:4.5.0'
    implementation 'com.android.support:cardview-v7:27.1.1'
    api project(':mobicomkit')//Note: use this for customization
    //api 'com.applozic.communication.message:mobicomkit:5.8.2' 
    implementation 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
    implementation 'com.squareup.picasso:picasso:2.5.2'

    implementation 'com.android.support.constraint:constraintlayout:1.1.2'
    compile 'ai.api:sdk:2.0.7@aar'
    compile 'ai.api:libai:1.4.8'
}

我收到以下错误:

  

注释处理器必须立即显式声明。下列   发现编译类路径上的依赖项包含注释   处理器。请将它们添加到注释处理器配置中。       -log4j-core-2.2.jar(org.apache.logging.log4j:log4j-core:2.2)

1 个答案:

答案 0 :(得分:0)

在依赖项中添加以下行。

annotationProcessor 'org.apache.logging.log4j:log4j-core:2.2'

有关更多信息:enter link description here