错误:android-apt插件与Android Gradle插件不兼容。请使用' annotationProcessor'而是配置

时间:2018-03-11 05:38:35

标签: android android-studio android-gradle build.gradle

我无法解决此错误。请帮我解决这个问题。

Gradle Error

Android Studio 3.0.1 Build#AI-171.4443003,建于2017年11月9日 JRE:1.8.0_152-release-915-b08 x86_64 JVM:JetBrains s.r.o的OpenJDK 64位服务器VM Mac OS X 10.13.3

以下是build.gradle的代码(Module:app)

apply plugin: 'com.android.application'
apply plugin: 'realm-android'

android {
    compileSdkVersion 24
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId 'com.app.test'
        minSdkVersion 14
        targetSdkVersion 24
        versionCode 2
        versionName '1.1'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

/* IMPORTANT :
 * Be careful when update dependencies, different version library may caused error */
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    // google library
    compile 'com.android.support:appcompat-v7:24.1.1'
    compile 'com.android.support:cardview-v7:24.1.1'
    compile 'com.android.support:recyclerview-v7:24.1.1'
    compile 'com.android.support:design:24.1.1'
    compile 'com.android.support:support-v4:24.1.1'
    compile 'com.google.android.gms:play-services-ads:9.2.1'
    compile 'com.google.android.gms:play-services-analytics:9.2.1'
    compile 'com.google.firebase:firebase-messaging:9.2.1'
    // library for api
    compile('com.squareup.retrofit2:retrofit:2.0.0-beta4') {
        exclude module: 'okhttp'
    }
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    // ripple effect library
    compile 'com.balysv:material-ripple:1.0.2'
}

apply plugin: 'com.google.gms.google-services'

0 个答案:

没有答案