After working on many xml and activities, everything was just fine. Now this error comes. And the worst thing is i can not find issue.
error: package databinding does not exist
and this
error: cannot find symbol BR
Build stack trace only shows this.
Can some tell me what is way to find issue in project. Because gradle
errors just showing databinding
class build error.
As i searched lot. This answer recommends to run with debug. When i build with debug then there are over 100k lines. How can i find exact issue line no?
The issue was not directly link to Android Databinding. There were a bug in the project (some variables not correctly setted)
I would recommend to use gradle with "--debug and --stacktrace" for more informations, it's helping a lot.
And this answer says to add some dependency. When i add this dependency
It is a problem caused by android-apt plugin. It ignores the provided dependency that data binding plugin adds.
You can work around it by adding:
apt 'com.android.databinding:compiler:1.0-rc0
to your gradle file.
I tried this but below error comes
Could not find method apt() for arguments [com.android.databinding:compiler:1.0-rc0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
How to get rid of this issue. Can android tell exactly where is the problem?