(Butterknife 注解配置)android studio 3.0 以上配置annotationProcessor

只需在项目中配置如下行即可 

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.andrew.myapplication"
        minSdkVersion 22
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    
        javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

你可能感兴趣的:((Butterknife 注解配置)android studio 3.0 以上配置annotationProcessor)