Change it to
addView(View child, int index, ViewGroup.LayoutParams params)
Looks like somehow you imported LinearLayout.LayoutParams
instead of ViewGroup.LayoutParams
and ViewGroup does not have a method with a signature like that.
Make sure your method is using the right kind of LayoutParams