私は非常に単純なレイアウトで、データバインディングの使用に切り替える必要がありました。今、私は私のcontroller_main.xml
に次のエラーを取得しています:データバインディングにはレイアウトファイルが含まれている必要があります
Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug_pro'.
**** /データバインディングエラー****のMSG:[44 68 44 68 25]をレイアウト ファイルを含める必要があります..エラーを結合。\アプリ\ SRC \メイン\ RES \レイアウト\ controller_main.xml **** \データ****
任意のアイデア?エラーは、タグ内のリソースandroid:layout
のIDが見つからないことを示しています(これは私の解釈です)が、それは当てはまりません。 include
タグをコメントアウトすると、エラーが削除されます。
誰にもこの問題がありますか?
controller_main.xml
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
android:fitsSystemWindows="true"
android:background="?attr/main_background_color"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/rlContent"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>
<include
android:layout_width="fill_parent"
android:layout_height="@dimen/tool_bar_top_padding"
android:id="@+id/stub_view_main_header_fixed"
android:layout="@layout/view_main_header_fixed"
app:elevation="0dp"/>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>
あなたはlayout
代わりのandroid:layout
を使用する必要があります
<?xml version="1.0" encoding="utf-8"?>
<View
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/vStatusbarBackground"
android:layout_width="match_parent"
android:layout_height="@dimen/tool_bar_top_padding" />
'INCLUDで「ID eのタグがありません "、これは不明な点は何ですか? – pskink
インクルードが表示されますか? idを定義しています。そして、私はどこから '' includeタグのIDが見つからないのかわかりません。 ''から...レイアウトが欠けていると言います。しかしレイアウトも同様に定義されています。問題はすでに解決されています... – prom85