Butter Knife - Unable to bind views for Fragment

Mufaddal Gulshan picture Mufaddal Gulshan · Aug 9, 2015 · Viewed 24.6k times · Source

I get an exception java.lang.RuntimeException: Unable to bind views for Fragment on ButterKnife.bind(this, view). The code is as shown below:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_personal, container, false);

    ButterKnife.bind(this, view);

    BindData();

    return view;
}

Answer

gropapa picture gropapa · Aug 9, 2015

have a look on this answer Using Butter Knife in Custom BaseAdapter SubClass Results in "Unable to inject views" error

looks like you must mistake on some view type or id