Have you tried using Butterknife library to bind Android's xml views for an Android library ? And ran into dreaded this error message:
You're not alone ! Many people like myself tried using wonderful Butterknife in their Android Libraries like they do in their regular phone and tablet projects. Actually, Butterknife is not intended to be used for Android libraries project because R class in library project is not final.
Here's the explanation from Jake himself:
Recent version of Butterknife library (8.5.1) supports library projects as well. Checkout out this link to configure library projects to start using Butterknife in your library projects as well.
Attribute must be constant
You're not alone ! Many people like myself tried using wonderful Butterknife in their Android Libraries like they do in their regular phone and tablet projects. Actually, Butterknife is not intended to be used for Android libraries project because R class in library project is not final.
Here's the explanation from Jake himself:
Values on the[UPDATE]R
class are notfinal
in library modules which makes this library unusable on those modules. This is a limitation of Java, and something this library has decided not to work around. See #2.
Recent version of Butterknife library (8.5.1) supports library projects as well. Checkout out this link to configure library projects to start using Butterknife in your library projects as well.