Butter Knife - Unable to associate species for fragment

I get java.lang.RuntimeException exception: Unable to bind views for fragment on ButterKnife.bind (this, view). The code looks like this:

@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; } 
+7
android butterknife
source share
3 answers

take a look at this answer Using Butter Knife in Custom BaseAdapter SubClass Results in "Unable to Enter Views" Error

it looks like you should be mistaken in some type of view or id

+9
source share

Duplicate answer. Anyway, my problem (and probably yours too):

 <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" /> 

ImageView is then bound to another class, such as ImageButton

 @Bind(R.id.imageView) ImageButton notAnImageButton 
+4
source share

This error occurs due to an invalid binding view data type.

0
source share

All Articles