ジェームズ・ブラック:
今朝私は私のアプリがインストールされませんエラーを持って、私はこの問題にそれをトレースしています。私は、同じファイル内の同じクラスの2つがあります。私はそれが非常に長いと全体生成されたファイルをインクルードする必要はありません。
public class AddVinDialogFragmentBinding extends androidx.databinding.ViewDataBinding implements android.databinding.generated.callback.OnClickListener.Listener {
@Nullable
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
@Nullable
private static final android.util.SparseIntArray sViewsWithIds;
:
@Nullable
private com.ui.EventHandler mHandler;
@Nullable
private final android.view.View.OnClickListener mCallback1;
public class AddVinDialogFragmentBinding extends androidx.databinding.ViewDataBinding implements android.databinding.generated.callback.OnClickListener.Listener {
@Nullable
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
:
}
でgradle.properties
、私はこれを持っています:android.databinding.enableV2=true
私のレイアウトは非常に簡単です:
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="vin"
type="String" />
<variable name="handler" type="com.ui.garage.handlers.EventHandler" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.ui.AddVinDialogFragment">
<TextView
android:layout_width="wrap_content"
android:text="Please enter a VIN"
android:layout_height="wrap_content" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/add_vin_field"
android:layout_width="200dp"
android:maxLength="17"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/vin"
android:text="@={vin}" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/button"
android:onClick="@{() -> handler.addVin(vin)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/submit" />
</LinearLayout>
</layout>
私は、Android Studioの3.3カナリアを使用しています3
時々私は、重複クラスは私のレイアウトファイルであることを取得し、それを見つけることができませんDataBindingComponent
。どのような迷惑であることは、これは昨日働いたと私はそれ以来、バインディングを変更していないということです。
問題になるかもしれないものについての任意の提案ですか?
私は.gradle削除およびモバイル/ビルド/ *と清潔で複数回の再構築だけでなく、Androidのメーカーを終了し、再起動をしたしています。
私はデータバインディングと3つのレイアウトファイルを持っており、すべての3つは同じエラーを持っています。
シェリフ:
コンパイラの依存関係を削除し、それが3.2.0から、プラグインを結合を備えています。少なくともそれは私のために働きました。
kapt "com.android.databinding:compiler:$gradleVersion