error: cannot find symbol import com.gourav.news.databinding.ActivityDetailBindingImpl;
Do the following.
- In Android Studio in your Build tab check which gradle task failed:
- Select the "Gradle" tab on the top right of Android Studio:
- Find the gradle task that failed and double-click it:
- Let the gradle task finish and look at the output. It should say "FAILED" and some lines above that it should tell you what the problem is:
In this example the problem is, that I am using a boolean value for the visibility parameter like so: android:visibility="@{true}"
when it should be an Integer, but your data binding error will most likely be something else.
- Watch this video and take action.
This happened to me when I changed variable name in <data>
but forgot to change in the views. After changing it, this error was resolved.