Using Android Studio 2.2 Beta and ButterKnife 8.2.1
I have a MainActivity file which contain a
android.view.InflateException: Binary XML file line #81: Error inflating class fragment
In case i used the rootView.findViewById method everything is ok.
Paste the full exception
The full exception is here @JakeWharton
What makes you think Butter Knife is at fault here?
Caused by: java.lang.ClassCastException: android.support.v7.widget.RecyclerView cannot be cast to android.widget.AdapterView
You're trying to bind a RecyclerView to an AdapterView.
Just for future reference.
Caused by: java.lang.ClassCastException: android.support.v7.widget.RecyclerView cannot be cast to android.widget.AdapterView
That exception is triggered when you use the notation @OnItemSelected(R.id.recycler_view_tip_records) using a RecyclerView. The notation need an AdapterView object (ListView).
@OnItemSelected(R.id.recycler_view_tip_records)
public void onItemClick(int position){
Toast.makeText(getActivity().getApplicationContext(), "Item selected at position " + position, Toast.LENGTH_SHORT).show();
}
Or @OnItemClick from ListView
@OnItemClick(R.id.list_view)
public void onCameraSelected(View view, int position) {
}
Most helpful comment
Just for future reference.
That exception is triggered when you use the notation @OnItemSelected(R.id.recycler_view_tip_records) using a RecyclerView. The notation need an AdapterView object (ListView).