title: ButterKnife injection issue on some devices
body: <p><em>I can't replicate it</em> but I've seen this view injection crash affecting about 5-10% of my users through Crashlytics.</p>
  
  <p>The app works fine on everything I throw it at, but some users are definitely not having this experience.</p>
  
  <p>What am I missing? Why would this happen on some devices, but not on others of the same model?</p>
  
  <p>The devices affected include Nexus 4 and Nexus 5. I've tried it on both (Nexus 4 is my main device) without any problems. Also affected are a couple of Samsungs.</p>
  
  <p>Any ideas?</p>
  
  <p>Here's the full stack trace, followed by the <em>stupidly simple</em> class and layout xml:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.package.app/com.package.app.WelcomeActivity}: java.lang.RuntimeException: Unable to inject views for com.package.app.WelcomeActivity@42b210a8
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2282)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2340)
            at android.app.ActivityThread.access$800(ActivityThread.java:157)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:157)
            at android.app.ActivityThread.main(ActivityThread.java:5293)
            at java.lang.reflect.Method.invokeNative(Method.java)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
            at dalvik.system.NativeStart.main(NativeStart.java)
     Caused by: java.lang.RuntimeException: Unable to inject views for com.package.app.WelcomeActivity@42b210a8
            at butterknife.ButterKnife.inject(ButterKnife.java:263)
            at butterknife.ButterKnife.inject(ButterKnife.java:165)
            at com.package.app.WelcomeActivity.onCreate(WelcomeActivity.java:30)
            at android.app.Activity.performCreate(Activity.java:5389)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2246)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2340)
            at android.app.ActivityThread.access$800(ActivityThread.java:157)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:157)
            at android.app.ActivityThread.main(ActivityThread.java:5293)
            at java.lang.reflect.Method.invokeNative(Method.java)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
            at dalvik.system.NativeStart.main(NativeStart.java)
     Caused by: java.lang.IllegalStateException: Required view with id '2131296260' for field 'mButtonScores' was not found. If this view is optional add '@Optional' annotation.
            at butterknife.ButterKnife$Finder.findRequiredView(ButterKnife.java:122)
            at com.package.app.WelcomeActivity$$ViewInjector.inject(WelcomeActivity$$ViewInjector.java:12)
            at java.lang.reflect.Method.invokeNative(Method.java)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at butterknife.ButterKnife.inject(ButterKnife.java:254)
            at butterknife.ButterKnife.inject(ButterKnife.java:165)
            at com.package.app.WelcomeActivity.onCreate(WelcomeActivity.java:30)
            at android.app.Activity.performCreate(Activity.java:5389)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2246)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2340)
            at android.app.ActivityThread.access$800(ActivityThread.java:157)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:157)
            at android.app.ActivityThread.main(ActivityThread.java:5293)
            at java.lang.reflect.Method.invokeNative(Method.java)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
            at dalvik.system.NativeStart.main(NativeStart.java)
  </code></pre>
  
  <h2>- WelcomeActivity.java</h2>
  
  <pre><code>public class WelcomeActivity extends FretsActivity {
  
      private Context mContext;
  
      @InjectView(R.id.buttonPlay) public Button mButtonPlay;
      @InjectView(R.id.buttonScores) public Button mButtonScores;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
          setContentView(R.layout.activity_welcome);
  
          mContext = this;
          ButterKnife.inject(this);
  
          mButtonPlay.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent intent = new Intent(mContext, MainActivity.class);
                  startActivity(intent);
              }
          });
  
          mButtonScores.setOnClickListener(new View.OnClickListener(){
              @Override
              public void onClick(View v) {
                  Intent intent = new Intent(mContext, ScoreActivity.class);
                  startActivity(intent);
              }
          });
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.welcome, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          int id = item.getItemId();
          if (id == R.id.action_settings) {
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <h2>- activity_welcome.xml</h2>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      tools:context="com.package.app.screens.WelcomeActivity"&gt;
  
      &lt;ImageView
          android:id="@+id/imageLogo"
          android:src="@drawable/logo"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="50dp"
          android:layout_width="140dp"
          android:layout_height="80dp" /&gt;
  
      &lt;TextView
          android:layout_centerHorizontal="true"
          android:layout_below="@+id/imageLogo"
          android:text="Play the Game"
          android:fontFamily="sans-serif-thin"
          android:layout_width="wrap_content"
          android:textSize="36sp"
          android:layout_height="wrap_content" /&gt;
  
      &lt;Button
          android:id="@+id/buttonPlay"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="24dp"
          style="@style/QuizButton"
          android:text="@string/menu_play"
          android:paddingTop="@dimen/activity_vertical_margin"
          android:paddingBottom="@dimen/activity_vertical_margin"
          android:paddingLeft="50dp"
          android:paddingRight="50dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
      &lt;Button
          android:id="@+id/buttonScores"
          android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"
          android:text="@string/menu_scores"
          style="@style/QuizButton"
          android:layout_marginBottom="24dp"
          android:layout_marginLeft="@dimen/activity_horizontal_margin"
          android:textSize="18sp"
          android:paddingTop="@dimen/vertical_padding_half"
          android:paddingBottom="@dimen/vertical_padding_half"
          android:paddingLeft="25dp"
          android:paddingRight="25dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>