title: android databinding - cannot find class android.view.data
body: <p>I'm trying to implement databinding in my android app, however I'm stuck with this issue:</p>
  
  <p><code>java.lang.ClassNotFoundException: Didn't find class "android.view.data"</code></p>
  
  <p>My layout file looks like this:</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          tools:context="com.myapp.views.fragments.LocationSearchFragment"&gt;
  
          &lt;!-- data setup --&gt;
          &lt;data&gt;
              &lt;variable name="location"
                  type="com.myapp.models.Address" /&gt;
          &lt;/data&gt;
      &lt;/LinearLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>I updated my <code>build.gradle</code> file with following lines:</p>
  
  <pre><code>dataBinding {
      enabled = true
  }
  </code></pre>
  
  <p>As the documentation suggested: <a href="https://developer.android.com/topic/libraries/data-binding/index.html" rel="nofollow">https://developer.android.com/topic/libraries/data-binding/index.html</a> . I'm running the most recent version of Android Studio.</p>