I have no idea what is going on here but I am trying to set my ad unit ID dynamically through code like below and removing it from the XML but still get the error:
After trying,
Problem is solved by
xmlns:ads="http://schemas.android.com/apk/res-auto" line from root layout.supply adunit ID and adsize as follows,
app:adSize="SMART_BANNER"
app:adUnitId="@string/banner_ad_unit_id"