Bound view is null when using Butterknife in fragment
<p>I am using Butterknife to bind a single view in one of my fragments.  I have used Butterknife with no issue in a separate fragment, but for some reason in this fragment the bound view is null.  I am trying to add a child layout to it and I am receiving a NPE and I cannot figure out why.  The setup I have in this fragment is the same as I have in my other fragment that works perfectly.  </p>

<p>This is a snippet from the fragment including the Butterknife code.</p>

<pre><code>private View view;
@BindView(R.id.layoutHolder)
LinearLayout layoutHolder;

public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    view = inflater.inflate(R.layout.fragment_log, container, false);
    ButterKnife.setDebug(true);
    ButterKnife.bind(this, view);
    return view;
}
</code></pre>

<p>This is the method that is throwing the NPE.</p>

<pre><code>private void addLayoutToHolder(LinearLayout layout) {
    layoutHolder.addView(layout, 0);
}
</code></pre>

<p>Here is the error: </p>

<pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 
'void android.widget.LinearLayout.addView(android.view.View, int)'
on a null object reference

at com.omitted.LogFragment.addLayoutToHolder(LogFragment.java:101)
</code></pre>

<p>Here is the output from Butterknife.setdebug, which seems to be fine.</p>

<pre><code>Looking up view binder for com.omitted.LogFragment
HIT: Loaded view binder class.
Looking up view binder for com.omitted.CalculatorFragment
HIT: Loaded view binder class.  
</code></pre>

<p>I also checked to make sure that layoutHolder is indeed null, and it is.  But for the life of me I cannot figure out why.  </p>

<p>I can assign layoutHolder right before I add a layout to it, and it works just fine.  </p>

<pre><code>private void addLayoutToHolder(LinearLayout layout) {
    layoutHolder = ButterKnife.findById(view, R.id.layoutHolder); 
    layoutHolder.addView(layout, 0);
}
</code></pre>

<p>So it works for now, but I do not understand why in the hell Butterknife.bind in my onCreateView is not binding the view correctly.  </p>

<p>I hope I described this problem well enough...  </p>

<p>Thanks for any insight.</p>