data binding; view tag isn't correct, Android
<p>I'm stuck during Data Binding Android tutorial. I figured out that I have problem with binding data to the view.</p>

<pre><code> public class DataView extends FrameLayout {
 private DataViewBinding binding;

 public DataView (Context context, AttributeSet attrs) {
     super(context,attrs);
 }

 @Override
 protected void onFinishInflate()
 {
     super.onFinishInflate();
     binding = DataViewBinding.bind(this);       &lt;---
 }

 @Override
 protected void onAttachedToWindow()
 {
     super.onAttachedToWindow();
     DataSource dataSource = DataSource.get("Data View");
     binding.setDataSource(dataSource);          &lt;---
 } }
</code></pre>

<p>data_view.xml</p>

<pre><code>&lt;layout&gt;
    &lt;data&gt;
        &lt;variable
            name="dataSource"
            type="com.example.kaz.simplebindingdemo.DataSource" /&gt;
    &lt;/data&gt;
    &lt;com.example.kaz.simplebindingdemo.DataView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="16dp"
        tools:showIn="@layout/content_main"
        tools:context=".DataView"&gt;

        &lt;TextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@{dataSource.message}" /&gt;
    &lt;/com.example.kaz.simplebindingdemo.DataView&gt;
&lt;/layout&gt;
</code></pre>

<p>And in rendering I'm getting exception:</p>

<pre><code>java.lang.RuntimeException: view tag isn't correct on view:null     at
com.example.kaz.simplebindingdemo.databinding.DataViewBinding.bind(DataViewBinding.java:123)
    at
com.example.kaz.simplebindingdemo.databinding.DataViewBinding.bind(DataViewBinding.java:119)
    at
com.example.kaz.simplebindingdemo.DataView.onFinishInflate(DataView.java:22)
    at
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:844)
    at
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)    at
android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)     at
android.view.LayoutInflater.inflate(LayoutInflater.java:394)
</code></pre>

<p>Deletion binding declaration fix the problem but I have got no custom view. :)
Any  </p>