Yesterday I stumbled upon below error while developing my Android application which also has a ListFragment
The import android.support.v4.app.ListFragment conflicts with a type defined in the same fileI 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:import android.support.v4.app.ListFragment; public class ListFragment extends ListFragment { }I had given my class name as
ListFragment
,
and compiler was correctly telling me what went wrong.