Reputation: 5618
I added a new option in my gradle.properties file:
android.enableSeparateAnnotationProcessing=true
But I got the following warning from the compiler/builder:
WARNING: The option setting
android.enableSeparateAnnotationProcessing=true
is experimental and unsupported.
Also I tried to make it false
, but I got the following message:
Gradle may disable incremental compilation as the following annotation processors are not incremental: compiler-1.1.1.jar (android.arch.persistence.room:compiler:1.1.1), compiler-4.8.0.jar (com.github.bumptech.glide:compiler:4.8.0), 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.
Environment:
JRE 1.8.0_152-release-1136-b06 amd64
JVM OpenJDK 64-Bit Server VM by JetBrains s.r.o
Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338
Gradle 4.10.3
Android Gradle plugin: 3.3.1
Android doc:
When you include this flag, the Android Gradle plugin executes the annotation processors in a separate task and allows the Java compilation task to run incrementally. https://developer.android.com/studio/releases/gradle-plugin
Upvotes: 6
Views: 15768
Reputation: 41
Just remove android.enableSeparateAnnotationProcessing=true from your gradle.properties file and run your project.
Upvotes: 4
Reputation: 19250
You need to add kapt
dependencies for compiler dependency in your app gradle file.
For example: You should add below line in your app gradle file for android lifecycle dependency.
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycleVersion"
Also add apply plugin: 'kotlin-kapt'
in your app gradle top level to make it enable.
If you are using dagger you should also add kapt dependency for compiler like shown above.
Upvotes: -3
Reputation: 1411
This is a new feature. The warning is just that. It already works.
The warning will disappear in a future version of Android Studio.
Upvotes: 3