since you customized your content using Activity_basic_screen.xml, you need to go to that xml.
you need to show this code for activity_basic_screen.xml and indicate where you want to place the ad for specific details.
for general, in your activity_basic_screen.xml, you should have LinearLayout or other layouts where you want to show / inflate an ad. for one in your problem with the screenshot / Linearlayout, you should have this one:
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mainLayout" >
you get this error because i think you don't have a linear layout with
android:id="@+id/mainLayout"
you can name it differently
android:id="@+id/givenName"
but you have to change your link in java findViewById to "R.id.givenName"
for me, I usually use Ahmed's suggestion, so I don't need to program it in java, but I think that programming in java is more dynamic.
hope this helps.
PS. in your screenshot, you cover the name / project of your application, but you indicated the name of your package. this seems to be the same because you can find your application in a google game using this.
source share