How to get rid of Incremental annotation processing requested warning?

后端 未结 13 925
一生所求
一生所求 2020-12-04 08:27

I have just started using android development and trying to use Room library. Since yesterday I am facing this warning message

w: [kapt] Incremental a

13条回答
  •  無奈伤痛
    2020-12-04 08:40

    From Room documentation:

    "Room has the following annotation processor options...room.incremental: Enables Gradle incremental annotation proccesor."

    android {
        ...
        defaultConfig {
            ...
            javaCompileOptions {
                annotationProcessorOptions {
                    arguments = [
                        "room.schemaLocation":"$projectDir/schemas".toString(),
                        "room.incremental":"true",
                        "room.expandProjection":"true"]
                }
            }
        }
    }
    

    Be sure to update the room version to 2.2.x or higher.

提交回复
热议问题