Butterknife: Attribute value must be constant

Created on 7 Apr 2016  Â·  7Comments  Â·  Source: JakeWharton/butterknife

When I use butterkinfe in AS 2.1 preview 5 ,when i build my project,it tell me

'Attribute value must be constant'

Most helpful comment

ButterKnife can't be used in library projects.

All 7 comments

You need to use an R.id. constant.

I write like this
@Bind(R.id.listview) private ListView mListView;

and it tell me
'Attribute value must be constant'

ButterKnife can't be used in library projects.

thank you

Any workaround for this?

See the following link:
https://github.com/JakeWharton/butterknife#library-projects

When I use butterkinfe in AS 3.3 ,when i build my project,it tell me
'Attribute value must be constant'

Was this page helpful?
0 / 5 - 0 ratings