When I upgraded my Gradle Android plugin to 3.3.1 I got the following warning:
Task :app:compileDebugJavaWithJavac
Gradle may disable incremental compilation as the following annotation processors are not incremental: butterknife-compiler-8.6.0.jar (com.jakewharton:butterknife-compiler:8.6.0).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
dependencies {
// ...
implementation 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0' // <---- !!
}
ButterKnife: 8.6.0
Android Studio: 3.2.1 Build #AI-181.5540.7.32.5056338
Gradle plugin: 3.3.1
Gradle: 4.10.3
Java: 1.8.0_152 64bit
OS: Windows 10 64bit
Compile SDK: 28
Build tools: 28.0.3
Dupe of #1225
This issue seems to be persisting again. Migrated to androidx with butterknife version 10.1.0.
Did everything properly but at the final build getting this error.
Tried : android.enableSeparateAnnotationProcessing=true
unfortunately,It was on test so couldn't do much.
Plugins applied though:
Project build:
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.25.4'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Gradle properties:
android.useAndroidX=true
android.enableJetifier=true
App build:
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
implementation 'com.jakewharton:butterknife:10.1.0'
implementation 'com.jakewharton.rxbinding:rxbinding:0.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
Finally once I had generated R2 no issue on that but this error is irritating.
Hope this will help.
这个问题 还å˜åœ¨
Most helpful comment
这个问题 还å˜åœ¨