在project build 中配置
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.0' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }在APPbuild中配置
compile 'com.jakewharton:butterknife:8.4.0' apt 'com.jakewharton:butterknife-compiler:8.4.0'在APPbuild顶部
apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt'
这样编译环境就配好了
在seting 中plugins