将我的整个项目迁移到 android x后,我再也无法进行编译了. 我得到以下100个错误: e: M:\tmp\EverywhereLauncher\app\generated\data_binding_base_class_source_out\devWithoutTestWithAccessibilityDebug\dataBindingGenBase
          我得到以下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 
 我不知道从哪里继续.
我现在有两个问题.
>我只看到100个错误
>所有错误都是一样的,可能隐藏了真正的错误
我尝试了什么:
>我在我的项目build.gradle中跟随将打印错误的数量增加到10000:
gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xmaxerrs" << "10000"
        }
    } 
 这总是有效,但在这种情况下,它不会增加打印的错误
我接下来可以做些什么?
额外
>我使用以下
android.enableJetifier=true android.useAndroidX=true
>我使用android studio 3.2,使用kotlin 1.2.61和3.3.0-alpha01 gradle构建工具
>我使用3.3.0-alpha01 gradle构建工具,因为我也使用evernote com.evernote:android-state,否则没有 – 问题在这里解释:https://github.com/evernote/android-state/issues/56
在过去,在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)
            }
        }
    }
} 
 真实的问题
在我的例子中,我将一个类从java转换为kotlin,其中包含以下字段:
@Arg Integer someValue;
转换器创建如下:
@Arg internal var someValue: Int? = null
问题:
内部不能使用注释,因此失败,但日志只显示数据绑定错误…
示例项目build.gradle
https://gist.github.com/MFlisar/eca8ae6c2e6a619913ab05d503a4368f
