Interstitial Admob ads: “IllegalStateException: Only fullscreen activities can request orientation”

前端 未结 7 800
故里飘歌
故里飘歌 2020-11-28 22:26

Background

I have an app with Admob SDK used in it, to show Interstitial ads (full screen ads).

Reccently Google has updated the SDK, along with many other

7条回答
  •  鱼传尺愫
    2020-11-28 22:42

    It seems that upgrading to:

    com.google.firebase:firebase-ads:15.0.1
    

    solved this issue for me. I've just tested it on Nexus 5X with 8.1.0 and Interstitial Admob ads work now.

    More complete solution:

    app's build.gradle:

    ...
    
    android {
        compileSdkVersion 27
        buildToolsVersion '27.0.3'
    
        defaultConfig {
            ...
    
            targetSdkVersion 27
    
            ..
        }
    }
    
    dependencies {
        ...
    
        implementation 'com.google.firebase:firebase-core:15.0.2'
        implementation 'com.google.firebase:firebase-ads:15.0.1'
    
        ...
    }
    apply plugin: 'com.google.gms.google-services'
    

    top level build.gradle:

    buildscript {
        ...
    
        dependencies {
            ...
    
            classpath 'com.google.gms:google-services:3.3.0'
    
            ...
        }
    }
    
    ...
    

提交回复
热议问题