Status Update
Comments
va...@gmail.com <va...@gmail.com> #2
This one is beginning to be severe, after updating Kotlin to 1.6.0-RC2 the incidents have become more frequent (I hope they aren't related).
The only remedy is still to restart AS.
Still in Chipmunk 2021.2.1.3
uc...@google.com <uc...@google.com>
va...@gmail.com <va...@gmail.com> #3
Hi Roar, thank you for the report. I see a few other similar looking bug reports so I'll prioritize this.
Please let me know if you notice a pattern in which the incidents happen.
Description
Extracted from the link:
The correct way to use data binding expressions with included tags is:
======================================================
custom_control.xml
<layout>
<data>
<variable name="item" type="..." />
</data>
<Your>
<Layout>
<Here>
<!-- Note: "app:item" is defined by a @BindingAdapter -->
<SomeView app:item="@{item}" />
</Here>
</Layout>
</Your>
</layout>
and then call it from a layout:
activity_main.xml
...
<include layout="@layout/CustomControl" app:item="@{... db expression... }" />
======================================================
However, screwing this up leads to an error message like:
=======================================
Cannot find a setter for 'app:item' that accepts parameter type '...'
If a binding adapter provides the setter, check that the adapter is annotated correctly and that the parameter type matches.
=======================================
It would be nice to provide a clearer, more helpful error message in this case