Data Binding Kotlin Android studio errors
<p>I am trying to use Data binding library in my project, that is written in Kotlin. I am using Kotlin v.1.0.2 &amp; Gradle plugin v. 2.12 and with binding compiler. My build.gradle configured as follows:</p>

<pre><code>android {
    dataBinding {
        enabled = true
    }
}
kapt {
    generateStubs = true
}
dependencies {
    kapt "com.google.dagger:dagger-compiler:2.2"
    provided "org.glassfish:javax.annotation:10.0-b28"
    kapt "com.android.databinding:compiler:2.12"
}
</code></pre>

<p>In my Fragment layout I declared <code>&lt;data&gt;</code> block with some variables:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;data&gt;
        &lt;import type="android.view.View"/&gt;
        &lt;import type="com.xxx.ui.AuthorizationPresenter"/&gt;
        &lt;import type="com.xxx.entity.AuthProvider"/&gt;
        &lt;variable
            name="model"
            type="com.xxx.ui.authorization.Model"/&gt;
        &lt;variable
            name="presenter"
            type="com.xxx.ui.authorization.AuthorizationPresenter"/&gt;

    &lt;/data&gt;
    &lt;FrameLayout
  ... /&gt;
&lt;/layout&gt;
</code></pre>

<p>And then in my <code>AuthorizationFragment.kt</code> class I am setting these variables:</p>

<pre><code>override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
    binding = FragmentAuthorizationBinding.inflate(inflater)
    binding?.presenter = presenter
    binding?.model = Model()
    binding?.addOnRebindCallback(object : OnRebindCallback&lt;FragmentAuthorizationBinding&gt;() {
        override fun onPreBind(binding: FragmentAuthorizationBinding?): Boolean {
            val sceneRoot = binding?.root as ViewGroup
            TransitionManager.beginDelayedTransition(sceneRoot)
            return true
        }
    })
    return binding?.root
}
</code></pre>

<p>And the problem is though this code successfully compiles and builds APK, Android studio marks these lines</p>

<pre><code>binding?.presenter = presenter
binding?.model = Model()
</code></pre>

<p>as invalid and shows the following error: <code>Cannot access class 'com.xxx.ui.authorization.AuthorizationPresenter'. Check your module classpath for missing or conflicting dependencies</code>. 
I tried to add <code>kapt 'com.google.guava:guava:19.0'</code> to my <code>build.gradle</code>, but nothing has changed.
Also worth to mention that problem is only appears when I write my fragment in Kotlin, when it is written in Java everything is ok. </p>