title: ActivityMainBindingImpl cannot be found
body: <p>This is from the google site:
  A binding class is generated for each layout file. By default, the name of the class is based on the name of the layout file, converting it to Pascal case and adding the Binding suffix to it. The above layout filename is activity_main.xml so the corresponding generated class is ActivityMainBinding. This class holds all the bindings from the layout properties (for example, the user variable) to the layout's views and knows how to assign values for the binding expressions.</p>
  
  <p>In my case <strong>ActivityMainBinding</strong> is generated, but not <strong>ActivityMainBindingImpl</strong>. What is that class? How does it get generated?
  My project is written in Kotlin.</p>
  
  <pre><code>import android.util.SparseArray;
  import android.util.SparseIntArray;
  import android.view.View;
  import androidx.databinding.DataBinderMapper;
  import androidx.databinding.DataBindingComponent;
  import androidx.databinding.ViewDataBinding;
  import com.example.drake.kunuk.databinding.ActivityMainBindingImpl;
  import java.lang.IllegalArgumentException;
  import java.lang.Integer;
  import java.lang.Object;
  import java.lang.Override;
  import java.lang.RuntimeException;
  import java.lang.String;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  
  public class DataBinderMapperImpl extends DataBinderMapper {
    private static final int LAYOUT_ACTIVITYMAIN = 1;
  
    private static final SparseIntArray INTERNAL_LAYOUT_ID_LOOKUP = new SparseIntArray(1);
  
    static {
      INTERNAL_LAYOUT_ID_LOOKUP.put(com.example.drake.kunuk.R.layout.activity_main, LAYOUT_ACTIVITYMAIN);
    }
  
    @Override
    public ViewDataBinding getDataBinder(DataBindingComponent component, View view, int layoutId) {
      int localizedLayoutId = INTERNAL_LAYOUT_ID_LOOKUP.get(layoutId);
      if(localizedLayoutId &gt; 0) {
        final Object tag = view.getTag();
        if(tag == null) {
          throw new RuntimeException("view must have a tag");
        }
        switch(localizedLayoutId) {
          case  LAYOUT_ACTIVITYMAIN: {
            if ("layout/activity_main_0".equals(tag)) {
              return new ActivityMainBindingImpl(component, view);
            }
        throw new IllegalArgumentException("The tag for activity_main is invalid. Received: " + tag);
      }
    }
  }
  return null;
    }
  </code></pre>
  
  <p>my xml:</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
  &lt;data&gt;
      &lt;import type="android.view.View" /&gt;
      &lt;variable
              name="handler"
              type="com.example.drake.kunuk.ui.main.MainActivity" /&gt;
      &lt;variable
              name="manager"
              type="androidx.fragment.app.FragmentManager" /&gt;
  &lt;/data&gt;
  
  &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
      &lt;androidx.appcompat.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:animateLayoutChanges="true"
              app:title="@string/app_name"
              app:titleMarginStart="8dp" /&gt;
  
      &lt;com.google.android.material.tabs.TabLayout
              android:id="@+id/tab_layout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:pager="@{(pager)}"&gt;
      &lt;/com.google.android.material.tabs.TabLayout&gt;
  
      &lt;androidx.viewpager.widget.ViewPager
              android:id="@+id/pager"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:handler="@{handler}" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>MainActivity.kt:</p>
  
  <pre><code>import android.os.Bundle
  import androidx.appcompat.app.AppCompatActivity
  import androidx.databinding.DataBindingUtil
  import com.example.drake.kunuk.R
  import com.example.drake.kunuk.databinding.ActivityMainBinding
  
  class MainActivity : AppCompatActivity() {
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      val binding: ActivityMainBinding = DataBindingUtil
          .setContentView(this, R.layout.activity_main)
      binding.handler = this
      binding.manager = supportFragmentManager
  
  
  
  }
  </code></pre>
  
  <p>}</p>