After I upgrade my Android studio to 3.4, Android Gradle Plugin to 3.4 and gradle to 5.1.1
I got the data binding errors like below
I have made sure I cleaned project and rebuild, I have cleared cache and restarted AS.
This issue never happened before the upgrade
I can confirm it is because of the new gradle update
DataBinderMapperImpl.java:54: error: cannot find symbol
e: [kapt] An exception occurred: android.databinding.tool.util.LoggedErrorException: Found data binding errors. ****/ data binding error ****msg:Missing import expression although it is registered
I found the solution: Solution:
After I upgraded my Android studio and gradle plugin, I ran into similar issue because of the below line.
I was using this <import type="java.lang.String" />
in my layout file.
Removing this import solved the issue.
Just as in managed code, java.lang.* is imported automatically.