cannot find symbol BR in android data binding

If you are using Kotlin, try applying the following plugin to your app build.gradle file:

apply plugin: 'kotlin-kapt'

Clean your project and build it again. This solved the issue for me.


In case someone still has this problem. I solved this by invalidating the cache in Android Studio. And I'm using Android Studio 2 with API 23

File > Invalidate Caches/Restart


I find the cause of the problem in my case. I find in the import statements of my Data Object class contains:

import static android.databinding.tool.util.GenerationalClassUtil.ExtensionFilter.BR;

The problem gets solved after I removed that. Android Studio somehow resolved BR class wrongly for me.


It is a problem caused by android-apt plugin. It ignores the provided dependency that data binding plugin adds.

https://bitbucket.org/hvisser/android-apt/issue/38/android-apt-breaks-brand-new-data-binding#comment-18504545

You can work around it by adding: apt 'com.android.databinding:compiler:1.0-rc0 to your gradle file.