Yesterday I stumbled upon below error while developing my Android application which also has a ListFragment
[sourcecode language="java"]The import android.support.v4.app.ListFragment conflicts with a type defined in the same file[/sourcecode]
I had android-support-v4.jar in my libs folder and I was finding it
very difficult to understand what could go wrong in such a simple class.
And after taking a closer look it was heights of ignorance :),
see my class definition below:
[sourcecode language=”java”]
import android.support.v4.app.ListFragment;
public class ListFragment extends ListFragment {
}
[/sourcecode]
I had given my class name as ListFragment,
and compiler was correctly telling me what went wrong.
Leave a Reply