I've been trying to integrate express native ads to my application. In the express native ads documentation I've read that they work best when displayed with FULL_WIDTH ad size. I tried to set my ad size to FULL_WIDTH but it fails with IllegalStateException:
Caused by: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called.
Here is my xml code:
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="FULL_WIDTH"
ads:adUnitId="@string/native_ad_unit"/>
The ad unit is correct, it works with other ad sizes like 320x150 etc.
Is there something wrong with my implementation?
Cheers