Skip to content Skip to sidebar Skip to footer

AdMob InterstitialAdd Not Showing In 8.0.0

java.lang.RuntimeException: Unable to start activity ComponentInfo{bible.bibleinbasicenglish/com.google.android.gms.ads.AdActivity}: java.lang.IllegalStateException: Only fullscree

Solution 1:

EDIT

the newer (above 16) admob version fixed the issue

Old Answer

add this in your manifest

<activity
  android:name="com.google.android.gms.ads.AdActivity"
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
  tools:replace="android:theme"
 />

Solution 2:

If your target SDk version >= 27 then you get this error so try to add below code

void setRequestedOrientation(int requestedOrientation) {
    if (ActivityInfo.isFixedOrientation(requestedOrientation) && !fullscreen
            && appInfo.targetSdkVersion > O) {
        throw new IllegalStateException("Only fullscreen activities can request orientation");
    ....
    }

for more check this link


Solution 3:

just simply add this line in your gradle file

targetSdkVersion = 26

Post a Comment for "AdMob InterstitialAdd Not Showing In 8.0.0"