Android Studio AdView XML tag empty body? -


for reason, banner ad highlighted in main activity xml file "tip": xml tag has empty body reports empty tag body. validation works in xml / jsp / jspx / html /xhtml file types.

<com.google.android.gms.ads.adview         android:id="@+id/bannerad"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         ads:adsize="banner"         ads:adunitid="@+id/banner_ad_unit_id"></com.google.android.gms.ads.adview> 

i have never been able display ads or test ads in app, kept adview in case decided work 1 day. after updating android studio, first time saw appear on adview.

that's advice android studio, not error.

just change code to:

<com.google.android.gms.ads.adview         android:id="@+id/bannerad"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparenttop="true"         android:layout_centerhorizontal="true"         ads:adsize="banner"         ads:adunitid="@+id/banner_ad_unit_id"/> 

you can press alt+enter (or option+enter on macos) see suggested auto-edit.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -