疑难杂症之Error:android-apt plugin is incompatible with the Android Gradle plugin

照样还是Androidstudio 3.0 升级引起的,直接po方案。

  1. 修改根目录buid.gradle文件
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
//        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
  1. 修改app/buid.gradle文件
apply plugin: 'com.android.application'
//apply plugin: "com.neenbedankt.android-apt"

dependencies {
    ...........
    ...........
    //apt '**********'
    annotationProcessor '**********'
    ..............
    ..........
   
}

重点就是使用annotationProcessor 代替apt

你可能感兴趣的:(疑难杂症之Error:android-apt plugin is incompatible with the Android Gradle plugin)