Perhaps you are trying to install content from objects that already have a parent. It looks like you are installing some views in one action, for example:
TextView tv = new TextView(); layout.adView(tv); layout2.adView(tv);
and this error appears when you try to add this TV to a different format. In your situation, this is because the layout from one action is trying to be set as a child of another activity.
You must first release the child from another parent.
Seraphis
source share