AndroidX 迁移后找不到符号 DataBindingComponent

Cannot find symbol DataBindingComponent after AndroidX migration

将我的整个项目迁移到 android x 后,我无法再编译它了。

我收到 100 个以下错误:

e: M:\tmp\EverywhereLauncher\app\generated\data_binding_base_class_source_out\devWithoutTestWithAccessibilityDebug\dataBindingGenBaseClassesDevWithoutTestWithAccessibilityDebug\out\com\my\app\databinding\ActivityMainBinding.java:52: error: cannot find symbol
      @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                ^
  symbol:   class DataBindingComponent
  location: class ActivityMainBinding

我不知道从哪里继续。

我现在有两个问题。

我尝试了什么:

知道我接下来可以做什么吗?

额外

解决方案 - 增加记录的错误

过去,在 broject 的 build.gradle 文件中添加以下内容就足够了:

gradle.projectsEvaluated {
    tasks.withType(JavaCompile.class) {
        options.compilerArgs << "-Xmaxerrs" << "10000"
    }
}

对于 kotlin,以下内容会有所帮助:

afterEvaluate {
    if (project.plugins.hasPlugin("kotlin-kapt")) {
        kapt {
            javacOptions {
                option("-Xmaxerrs", 10000)
            }
        }
    }
}

真正的问题

在我的例子中,我将 class 从 java 转换为 kotlin,其中包含如下一些字段:

@Arg
Integer someValue;

转换器创建如下:

@Arg
internal var someValue: Int? = null

问题:

internal 不适用于注释,因此失败,但日志仅显示数据绑定错误...

示例项目build.gradle

https://gist.github.com/MFlisar/eca8ae6c2e6a619913ab05d503a4368f

我在更新到 androidx 后也遇到了这个错误,尝试了一些堆栈溢出帖子中建议的所有内容,最后更新到 gradle 插件 3.3.0-beta03 有效