this The specified child already has a parent. You must call removeView() on the child's parent first.
because you are adding child( radio group ) to the parent layout multiple times.
try like this
private void createRadioButton() {
final RadioButton[] rb = new RadioButton[5];
RadioGroup rg = new RadioGroup(this); //create the RadioGroup
rg.setOrientation(RadioGroup.HORIZONTAL);//or RadioGroup.VERTICAL
for(int i=0; i<5; i++){
rb[i] = new RadioButton(this);
rb[i].setText(" " + ContactsActivity.phonetype.get(i)
+ " " + ContactsActivity.phone.get(i));
rb[i].setId(i + 100);
rg.addView(rb[i]);
}
ll.addView(rg);//you add the whole RadioGroup to the layout
}