Have this weird bug where lint will throw an exception about @BindDimen
I had this line and it worked fine till now
@BindDimen(R.dimen.divider_margin)
int dividerMargin;
Now lint sometimes fails. Not sure if it's an issue with AS or with butterknife. Attaching lint result

I'll emit suppressions on the generated code. The next version will add @DimenRes to the @BindDimen (and other) annotations so it will be lint-impossible to pass the wrong value anyway and the check will happen at the right place.
This is blocked by #330.
Any idea why it fails some of the times?
Nope. No clue.
On Tue, Aug 25, 2015 at 6:31 PM Arthur [email protected] wrote:
Any idea why it fails some of the times?
—
Reply to this email directly or view it on GitHub
https://github.com/JakeWharton/butterknife/issues/338#issuecomment-134760774
.
Closing the issue then. Maybe we'll find out in the next version
@c0nnector do you use retrolambda and android-retrolambda-lombok? I just added those two to a project and had this error for the first time.
@gabrielittner Not using retrolamda
Is it possible that the ID changes and the generated class is not invalidated?
Ah, probably. It's a shame we can't get the reference to the actual R
constant (without epic hacks).
On Wed, Aug 26, 2015 at 5:22 PM Tom Reznik [email protected] wrote:
Is it possible that the ID changes and the generated class does not get
invalidated?—
Reply to this email directly or view it on GitHub
https://github.com/JakeWharton/butterknife/issues/338#issuecomment-135173773
.
I think it's an AS studio issue. Started after i updated to AS 1.4 preview 3
Ok, got some clarification. Lint analyses sources as text files (maybe also class files). When I've tried to put in sources not constant reference but its value I got already error in AS:

Created tools bug report https://code.google.com/p/android/issues/detail?id=183997&thanks=183997&ts=1440653372
Would adding //noinspection ResourceType to the generated ViewBinder fix this? I'm seeing it as well.
For the time being I'd recommend adding this to your lint.xml
<issue id="ResourceType">
<!-- Remove this when this is fixed: https://github.com/JakeWharton/butterknife/issues/338 -->
<ignore path="**/*$$ViewBinder.java" />
</issue>
Just to clarify, the lint.xml file should be on your-project-folder/app/lint.xml
Hmm. I started getting this error with butterknife-8.2.1. Using kapt (dunno if this is related).
Can this be a regression?
Though it's not @BindDimen as in original issue, but @BindView
Checking in to say that I get lint errors on 8.2.1 related to @BindView as well. @felipecsl's solution worked for me, but I had to change the path to **/*_ViewBinding.java:
<issue id="ResourceType">
<!-- Remove this when this is fixed: https://github.com/JakeWharton/butterknife/issues/338 -->
<ignore path="**/*_ViewBinding.java" />
</issue>
Currently experiencing this issue on 8.4.0 The following open source repository at this commit can reproduce the error 100% of the time: https://github.com/AOrobator/Konstellations/commit/6ff414762c20158e7dab3d383e05e6960d029fed
Most helpful comment
For the time being I'd recommend adding this to your lint.xml