title: Android Data binding causing problem in include layout
body: <p>Hello hope you are all fine.  I migrated my project from old version to latest version i.e 29. And I resolve all the errors. The problem is that I cannot resolve my toolbar error.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="controller"
              type="com.cvvm.Controller" /&gt;
  
          &lt;variable
              name="menu"
              type="java.lang.Integer" /&gt;
  
          &lt;variable
              name="itemClickListener"
              type="androidx.appcompat.widget.Toolbar.OnMenuItemClickListener" /&gt;
  
          &lt;import type="com.bonnti.misc.NavigationClickListener" /&gt;
      &lt;/data&gt;
  
      &lt;androidx.appcompat.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="@drawable/btn_red_gradient"
          android:title="@{controller.title}"
          app:showBackButton="@{controller.previous != null}"
          app:itemClickListener="@{itemClickListener}"
          app:navigationClickListener="@{(NavigationClickListener)controller}"
          app:menu="@{menu}"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /&gt;
  
  &lt;/layout&gt;
  </code></pre>
  
  <p>and I am including this in other layouts like this</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"&gt;
  
      &lt;data&gt;
  
          &lt;variable
              name="controller"
              type="com.bonnti.screens.combthru.combthruitem.ItemCombthruController" /&gt;
  
  
          &lt;import type="com.bonnti.R" /&gt;
  
          &lt;import type="com.bonnti.misc.utils.TextUtils" /&gt;
      &lt;/data&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
  
          &lt;RelativeLayout
              android:id="@+id/toolbar_item_combthru"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;include
                  layout="@layout/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  app:controller="@{controller}" /&gt;
  
              &lt;LinearLayout
                  android:id="@+id/linearLayout2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentRight="true"
                  android:layout_centerVertical="true"
                  android:layout_marginTop="4dp"
                  android:layout_marginRight="@dimen/size_2dp"
                  android:clickable="true"
                  android:onClick='@{controller::onThreeDotsClick}'
                  android:padding="@dimen/size_10dp"
                  android:visibility='@{controller.isThreeDotsVisible}'&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginRight="6dp"
                      android:src="@drawable/ic_point_first_white" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginRight="6dp"
                      android:src="@drawable/ic_point"
                      android:tint="@color/white" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginRight="6dp"
                      android:src="@drawable/ic_point"
                      android:tint="@color/white" /&gt;
  
              &lt;/LinearLayout&gt;
          &lt;/RelativeLayout&gt;
  
  
          &lt;include
              android:id="@+id/list"
              layout="@layout/list"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@+id/toolbar_item_combthru"
              android:layout_marginBottom="@dimen/size_40dp"
              app:adapter="@{controller.adapter}"
              app:loadMoreListener="@{controller}" /&gt;
  
          &lt;RelativeLayout
              android:id="@+id/input"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:background="@color/white"
              android:padding="@dimen/size_10dp"
              android:visibility='@{controller.isCommentMode}'&gt;
  
              &lt;ImageView
                  android:id="@+id/ic_im"
                  android:layout_width="20dp"
                  android:layout_height="20dp"
                  android:scaleType="centerInside"
                  app:srcCompat="@drawable/ic_combthru_comments" /&gt;
  
              &lt;EditText
                  android:id="@+id/et_text"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_centerVertical="true"
                  android:layout_marginLeft="@dimen/size_10dp"
                  android:layout_marginRight="@dimen/size_10dp"
                  android:layout_toStartOf="@+id/ic_sent"
                  android:layout_toEndOf="@+id/ic_im"
                  android:background="@null"
                  android:hint="@string/comment"
                  android:textColor="@color/textColor"
                  android:textSize="@dimen/size_14sp" /&gt;
  
              &lt;ImageButton
                  android:id="@+id/ic_sent"
                  android:layout_width="20dp"
                  android:layout_height="20dp"
                  android:layout_alignParentRight="true"
                  android:background="@null"
                  android:onClick='@{controller::sentComment}'
                  android:scaleType="centerInside"
                  app:srcCompat="@drawable/ic_comb_sendcomment" /&gt;
          &lt;/RelativeLayout&gt;
  
  
      &lt;/RelativeLayout&gt;
  &lt;/layout&gt;
  
  
  
  public abstract class Controller&lt;B extends ViewDataBinding&gt; extends SerializableController&lt;B&gt; {
      @Override Strategy&lt;B&gt; createStrategy() {
          return new FragmentStrategy&lt;&gt;(this);
      }
  }
  
  public abstract class BonntiController&lt;B extends ViewDataBinding&gt; extends Controller&lt;B&gt; implements NavigationClickListener {
      private static final String TAG = BonntiController.class.getSimpleName();
  
  
      public void onMediaSelected(String uri) {
          // stub
          Log.w(TAG, "onMediaSelected: activity result ignored");
      }
  
      protected void onBroadcastReceived(Intent intent){
          // stub
          Log.w(TAG, "onBroadcastReceived: activity result ignored");
      }
  
  
      //back arrow click
      @Override public void onNavigationClick() {
          back();
      }
  }
  
  
  public class ItemCombthruController extends BonntiController&lt;LayoutItemCombthruBinding&gt; implements RemoveCommentListener,
          LoadMoreListener {
  
      public final Combthru combthru;
      public BaseAdapter&lt;BaseVM&gt; adapter = new BaseAdapter&lt;&gt;(new ArrayList&lt;&gt;());
      public ObservableBoolean isCommentMode = new ObservableBoolean();
  
      public ItemCombthruController(Combthru combthru) {
          Log.d("BBB", "YES!!!");
          this.combthru = combthru;
          adapter.add(new ItemCombthruTopVM(combthru, this));
          if (combthru.comments != null &amp;&amp; combthru.comments.size() != 0) {
              for (Combthru.Comment comment : combthru.comments) {
                  adapter.add(new CombthruCommentVM(this, comment, this));
              }
          }
          isCommentMode.set(true);
      }
  }
  </code></pre>
  
  <p>My problem is that it gives me below error. I have tried everything from stackoverflow (clean project, invaidate cache/restart, rebuild project, include kotlin etc)and issue did not solve. When I press   app:controller="@{controller}" it says that "cannot find declararion to go". Any help will be appreciated. Thanks in advance. </p>
  
  <p>****/ data binding error ****msg:Cannot find the setter for attribute 'app:controller' with parameter type com.bonnti.screens.combthru.combthruitem.ItemCombthruController on com.bonnti.databinding.ToolbarBinding.
  file:D:\bonnti-android-gitlab\app\src\main\res\layout\layout_item_combthru.xml</p>