【问题标题】:Android DataBinding KAPT Incremental SupportAndroid DataBinding KAPT 增量支持
【发布时间】:2020-02-07 07:54:14
【问题描述】:

我查看了this answer 和此站点上的其他人并使用 Google,但我还没有找到适用于此问题的答案。这是最新版本的 KAPT 列出的剩余非增量注释处理器:

Incremental annotation processing requested, but support is disabled because the following processors are not incremental: android.databinding.annotationprocessor.ProcessDataBinding (NON_INCREMENTAL)

请注意,我已迁移到 AndroidX,并且正在使用 AGP 3.4.1(无法升级到 AGP 3.5.x)和 Gradle 5.5。任何帮助将不胜感激。

【问题讨论】:

    标签: android android-studio build kapt


    【解决方案1】:

    无法升级到 AGP 3.5.x

    这将是一个问题。引用Google:

    我很高兴地通知您,从 AGP 3.5.0-alpha05 开始,数据绑定已成为增量。为了安全起见,我们将此功能置于标志后面,目前默认关闭。要启用它,请在 Gradle 属性文件中设置android.databinding.incremental=true

    如果你一直跳到 AGP 3.6.x(目前处于 alpha 阶段),默认启用增量编译。

    但是,在您的版本 AFAIK 中,数据绑定内容根本不存在增量编译支持。

    【讨论】:

    • AGP 代表什么?
    • @JBlaz:Android Gradle 插件。
    • 我就是这么想的。我在 4.0.0 上,但仍然有警告。
    • @JBlaz:如果将android.databinding.incremental=true 添加到gradle.properties 文件中,警告会消失吗?
    • 不,它还在。
    猜你喜欢
    • 1970-01-01
    • 2017-01-24
    • 1970-01-01
    • 2016-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-13
    • 2017-09-19
    相关资源
    最近更新 更多