I've already tried setting the java sdk version to 1.6(It was already set correctly). I've also tried cleaning the project as well as restarting eclipse.
My definition appears correct as I used eclipse's Source > Override/Implement Methods create the methods from subclasses ViewGroup.
@Override
public void addView(View child, int index, LayoutParams params) {
super.addView(child, index, params);
}