小编Ren*_*los的帖子

Android Studio 3.0错误:android-apt不兼容

我是Android开发的新手,并获得了一个遗留项目.所以我安装了最新版本的Android Studio并打开它.

当我尝试构建它时,我收到此错误:

Error:android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.
Run Code Online (Sandbox Code Playgroud)

我正在尝试这些线程中显示的解决方案,但它没有用.

我的grandle构建脚本上没有任何android-apt参考.

许多编译包显示为过时.但是,当我按照Android的工作室建议更新参考时,我得到错误,说找不到包.

正如我所说的,我是Android Studio World的新手,所以我对这些东西都有些失落.

这是我的build.gradle(模块:app):

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'realm-android'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"


    defaultConfig {
        applicationId "xxxxxxxxxxxx"
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 123
        versionName "1.2.3"
        manifestPlaceholders = [HOCKEYAPP_APP_ID: "xxxxxxxxxxxxxxxxxxxxx"]

        //For Test
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions { …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio android-apt realm-java

5
推荐指数
1
解决办法
7403
查看次数