Robobinding issues with new BuildTools/AndroidStudio/gradle

14 views
Skip to first unread message

Andrzej Biernacki

unread,
Sep 11, 2017, 2:46:37 AM9/11/17
to RoboBinding
Hello!

We use Robobinding extensively in our project (and it is great). But there is issue when upgrading to newest BuildTools/gradle/Android Studio. To experience it you can just update https://github.com/RoboBinding/RoboBinding-album-sample with build.gradle and gradle-wrapper-properties from attachment. 

It seams that robobing expects to find for every static resource like: bind:itemLayout="@layout/album_row", bind:emptyViewLayout="@layout/albums_empty_view" exact same string @layout/album_row, @layout/albums_empty_view. Unfortunately this values are replaced by resource ids like @7f010007 (from R class). It is the reason of runtime binding crashing error.

I found one workaround. You can substitute pattern from class org.robobinding.attribute.StaticResource:
- static final String PATTERN = "@([\\w\\.]+:)?(\\w+)/(\\w+)";
+ static final String PATTERN = "@?([\\w\\.]+:)?(\\w+)/(\\w+)";

and in layout files use bind:itemLayout"layout/album_row". It's not pretty but it works. Maybe you have other ideas to fix? I would be happy to contribute.

Best regarrd,
Andrzej




build.gradle
gradle-wrapper.properties
Reply all
Reply to author
Forward
0 new messages