我一直试图解决这个烦人的问题太久了,但没有任何进展。
我们的应用程序大部分类都是用 Kotlin 编写的,我们也使用了数据绑定:
apply plugin: "kotlin-kapt"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
Run Code Online (Sandbox Code Playgroud)
在尝试运行 de 应用程序时,我们在构建对话框中看到多个异常如下(当我说多个时,我的意思是超过 50 个):
e: .../android/app/build/generated/source/dataBinding/baseClasses/dev/debug/com/company/app/databinding/IncludeFilterHeaderTabButtonBinding.java:21: error: cannot find symbol
protected IncludeFilterHeaderTabButtonBinding(DataBindingComponent _bindingComponent, View _root,
^
symbol: class DataBindingComponent
location: class IncludeFilterHeaderTabButtonBinding
Run Code Online (Sandbox Code Playgroud)
这个应用程序导入了一个完全用 Java 编写的自制 SDK,并且还使用了数据绑定。这样做有什么已知问题吗?
这是主应用程序的依赖项:
implementation 'com.android.support:support-core-utils:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.google.android.gms:play-services-vision:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.github.bumptech.glide:compiler:4.7.1'
kapt "com.android.databinding:compiler:3.1.3"
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation …Run Code Online (Sandbox Code Playgroud)