Android 不记录广告曝光。没有活动';谷歌Admob回报了Divideo';

Android 不记录广告曝光。没有活动';谷歌Admob回报了Divideo';,android,firebase,android-activity,google-admob,Android,Firebase,Android Activity,Google Admob,当我想切换到另一个活动时,会出现错误。问题就从现在开始了:我正试图添加“Google Admob RewardedVideo”。添加标志广告后没有问题 23198-23236/com.metabrain.emre V/FA:记录用户 订婚,ms:46984 23198-23236/com.metabrain.emre V/FA:活动已暂停,时间:84767609 23198-23236/com.metabrain.emre V/FA:未记录ad 单位曝光量。无活动 23198-23236/com

当我想切换到另一个活动时,会出现错误。问题就从现在开始了:我正试图添加“Google Admob RewardedVideo”。添加标志广告后没有问题

23198-23236/com.metabrain.emre V/FA:记录用户 订婚,ms:46984

23198-23236/com.metabrain.emre V/FA:活动已暂停,时间:84767609

23198-23236/com.metabrain.emre V/FA:未记录ad 单位曝光量。无活动

23198-23236/com.metabrain.emre V/FA:不记录广告暴露。不 活跃活动

信息:

21105-21105/?W/IIInputConnectionWrapper: 在非活动输入连接上显示状态图标

18621-18621/?I/FA:应用程序测量正在启动,版本:10084

18621-18621/?I/FA:要启用调试日志运行: adb外壳setprop log.tag.FA详细信息

18621-18621/?I/FA:要启用更快的调试模式事件日志记录运行: adb shell setprop debug.firebase.analytics.app com.ext.ui

18276-18484/?I/FA-SVC:应用程序测量正在启动,版本:11302

18276-18674/?I/FA-SVC:正在标记此实例 作为上传者

19034-19034/com.metabrain.emre I/FA:应用程序测量正在启动,版本:11020

19034-19034/com.metabrain.emre I/FA:启用调试日志运行:adb shell setprop log.tag.FA详细

19034-19034/com.metabrain.emre I/FA:启用更快的调试模式事件 日志运行: adb shell setprop debug.firebase.analytics.app com.metabrain.emre

19034-19069/com.metabrain.emre I/FA:标记管理器不可用 已发现,因此不会使用

冗长的:

08-13 15:05:14.959 19034-19069/com.metabrain.emre I/FA:标记管理器正在运行 未找到,因此不会使用08-13 15:05:14.992 19034-19069/com.metabrain.emre D/FA:记录事件(FE): ad_查询(_aq),Bundle[{firebase_event_origin(_o)=am, 广告事件id(_aeid)=-949480578009143333}]08-13 15:05:15.041 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.041 19034-19069/com.metabrain.emre V/FA:连接尝试 已在进行08-13 15:05:15.043 19034-19069/com.metabrain.emre D/FA:记录事件(FE):ad_查询(_aq), Bundle[{firebase\u event\u origin(\u o)=am, 广告事件id(_aeid)=-949480578009143354}]08-13 15:05:15.057 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.057 19034-19069/com.metabrain.emre V/FA:连接尝试 已在进行08-13 15:05:15.085 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.085 19034-19069/com.metabrain.emre V/FA:连接尝试已在中 进度08-13 15:05:15.087 19034-19069/com.metabrain.emre D/FA: 记录事件(FE):屏幕视图(vs), Bundle[{firebase\u event\u origin(\u o)=自动, firebase屏幕级(_sc)=主要活动, firebase_screen_id(_si)=-949480578009143353}]08-13 15:05:15.101 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.101 19034-19069/com.metabrain.emre V/FA:连接尝试 已在进行08-13 15:05:15.105 19034-19069/com.metabrain.emre V/FA:活动恢复,时间:83370181 08-13 15:05:15.270 19034-19069/com.metabrain.emre V/FA:屏幕暴露时间小于1000 未发送ms事件。时间:18408-1315:05:15.270 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.270 19034-19069/com.metabrain.emre V/FA:连接尝试 正在进行08-13 15:05:15.272 19034-19069/com.metabrain.emre V/FA:活动暂停,时间:83370365 08-13 15:05:15.306 19034-19069/com.metabrain.emre D/FA:记录事件(FE): 应用程序异常(_ae),Bundle[{firebase_event_origin(_o)=崩溃, 时间戳=1502625915299,致命=1}]08-13 15:05:15.324 19034-19069/com.metabrain.emre V/FA:使用测量服务08-13 15:05:15.324 19034-19069/com.metabrain.emre V/FA:连接尝试 已在进行中

依赖项:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
        compile 'com.google.firebase:firebase-core:11.0.4'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.firebase:firebase-ads:11.0.4'
    compile 'com.google.firebase:firebase-crash:11.0.4'
    ...
    testCompile 'junit:junit:4.12'
    compile "com.google.android.gms:play-services-games:11.0.4"
    compile 'com.android.support:multidex:1.0.1'
    compile project(path: ':BaseGameUtils')
}

我曾经遇到过这样一个关于间隙广告的问题,发现用户试图离开活动,而间隙添加已经加载,但尚未显示给用户。我通过以下方式解决了这个问题:

  • 定义布尔标志:

    private boolean addIsReady;
  • 在向用户显示广告之前,将标志设置为false,方法如下:

    void showInterstitialAd(){ if (mmAd == null) return; if (myAd.isLoaded()) { addIsReady = false; myAd.show(); } }

  • 我希望这个答案能帮助你。

    在本地广告上也有同样的问题。它只是突然出现,在
    ViewPager
    中在页面之间滑动时不断打印这些消息。 void showInterstitialAd(){ if (mmAd == null) return; if (myAd.isLoaded()) { addIsReady = false; myAd.show(); } }
    @Override
    public void onBackPressed() {
        if (addIsReady){
            requiredLawIndex = -1;
            showInterstitialAd();
        }
        super.onBackPressed();
    }