I\'m attempting to use Butter Knife to simplify creation of a custom BaseAdapter class. I\'m following the example here: http://jakewharton.github.io/butterknife/ under the \"A
Check if your @InjectView
s has correct type. I've used ImageView
instead of LinearLayout
. That might be your problem too.
Update:
Make sure you are not using ButterKnife's @OnItemClick(R.id.non_list_view)
with a non ListView
. I was using it for a android.support.v7.widget.RecyclerView
which was causing following exception:
java.lang.RuntimeException: Unable to inject views for MyFragment{... id=.... android:switcher:...}