I'm using ButterKnife library in my android application. It works fine in Activities. But when I use that in Fragment it give me an error while building the project. Here is my code :
package com.foxastudios.stopnosocomials.Fragments;
public class FragmentObserveeOne extends Fragment {
@BindView(R.id.text_obs_one_name) TextView obsName;
public FragmentObserveeOne() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_observee_one, container, false);
ButterKnife.bind(this,rootView);
obsName.setText("TEXT");
return rootView;
}
}
My fragments are in a separate package named Fragments. And here is the errors that I get:
Error:(8, 39) error: cannot find symbol class Fragments
Error:(13, 65) error: package Fragments does not exist
Error:(27, 59) error: package Fragments does not exist