You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class A { @Bind(R.id.a) View viewA; { ButterKnife.inject(this) } }
class B extends A { @Bind(R.id.b) View viewB; }
Where A and B exist in their own file, A.java and B.java, when you modify B.java without modifying A.java, you end up with viewA being null at runtime.
I use the following ANT build script to ensure all classes that include @Bind annotations are included for each build. This is not ideal but avoids the issue.
<project basedir=".">
<description>
Fix ButterKnife bug caused by the compiler not including unmodified @Bind classes.
</description>
<target name="prebuild" description="Ensure the right source files are added to the build">
<touch>
<fileset dir="../source/java">
<contains text="@Bind" />
</fileset>
</touch>
</target>
</project>
I'm not sure if a bug exists for this issue already; but it's likely related to #362
The text was updated successfully, but these errors were encountered:
Given a class hierarchy like so:
class A { @Bind(R.id.a) View viewA; { ButterKnife.inject(this) } }
class B extends A { @Bind(R.id.b) View viewB; }
Where A and B exist in their own file,
A.java
andB.java
, when you modifyB.java
without modifyingA.java
, you end up withviewA
beingnull
at runtime.I use the following ANT build script to ensure all classes that include
@Bind
annotations are included for each build. This is not ideal but avoids the issue.I'm not sure if a bug exists for this issue already; but it's likely related to #362
The text was updated successfully, but these errors were encountered: