My goal is to migrate android gradle plugin from 3.5.1 to 3.5.2.
However, once I do that the build fails with the following error:
error: cannot generate view binders java.lang.StackOverflowError
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:209)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
at android.databinding.tool.expr.Expr.resolveListeners(Expr.java:211)
It clearly states that it has something to do with databinding, but the stacktrace is really poor. I've tried to apply additional compiler args to get some other insights with no luck.
Has anyone faced the same issue? Any tips?
Looks like AGP 3.5.2 fails once you invoke ObservableField.get()
inside your xml files. Please see this comment to similar problem at Google Issues Tracker.
You can try to just remove .get()
usages from your codebase which is completely safe.
Edit:
If you're using LiveData, make sure you're not using .getValue()
in any of your XML files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With