Thursday 15 August 2013

java - How to resolve The method addView(View, int, LinearLayout.LayoutParams) of type YourLayout must override or implement a supertype method -


I have already tried to set Java SDK version to 1.6 (it was already set correctly) . I also tried to clean the project and restart eclipse.

My definition looks right because I have a source of eclipse & gt; Override / Implementation methods make methods from sub-classes view groups.

  @ Override public voice review (see child, int index, layout parameters parameter) {super.addView (child, index, parameters); }    

change it

  addView (see) Either way you look like  LinearLayout.LayoutParams  instead of  ViewGroup.LayoutParams  and ViewGroup Import, child, int index, ViewGroup.LayoutParams consultant)   

There is no such method with a signature.

Make sure your method is using the correct type of layout parameter

No comments:

Post a Comment