Lifecycle Annotation Processor with Java 8 Compile Option
Lifecycle Annotation Processor with Java 8 Compile Option
For faster incremental build, switch to the Lifecycle Java 8 API with these steps:
First replace annotationProcessor "androidx.lifecycle:lifecycle-compiler:*version*" kapt "androidx.lifecycle:lifecycle-compiler:*version*" with implementation "androidx.lifecycle:lifecycle-common-java8:*version*" Then remove any OnLifecycleEvent
annotations from Observer
classes and make them implement the DefaultLifecycleObserver
interface.
Issue id: LifecycleAnnotationProcessorWithJava8
https://d.android.com/r/studio-ui/lifecycle-release-notes
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |
Last modified: 13 July 2023