flutter - 消息太多 - Web View 被破坏。忽略 Action

标签 flutter firebase-admob

将 admob 添加到项目并使用后,当屏幕上没有任何反应且应用程序变得太慢时,我经常在控制台中收到此类消息。

I/Ads ( 3001): This request is sent from a test device.

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/chatty ( 3001): uid=10080(com.github.testapp) identical 1 line

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

I/chatty ( 3001): uid=10080(com.github.testapp) RenderThread identical 18 lines

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/chatty ( 3001): uid=10080(com.github.testapp) identical 1 line

W/Ads ( 3001): #004 The webview is destroyed. Ignoring action.

I/Choreographer( 3001): Skipped 30 frames! The application may be doing too much work on its main thread.

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

I/chatty ( 3001): uid=10080(com.github.testapp) RenderThread identical 88 lines

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

D/EGL_emulation( 3001): eglMakeCurrent: 0xe63abce0: ver 3 0 (tinfo 0xbf992bc0)

E/eglCodecCommon( 3001): glUtilsParamSize: unknow param 0x000085b5

我以这种方式在无状态小部件中使用它:

 @override
 Widget build(BuildContext context) {
    BannerAd _currentBannerAd = BannerAd(
      adUnitId: AdManager.bannerAdUnitId,
      size: AdSize.banner,
    );
    
    void _loadBannerAd() {
      _currentBannerAd
        ..load()
        ..show(anchorType: AnchorType.bottom);
    }
    
    _loadBannerAd();

    return FutureBuilder<List<String>>(...

最佳答案

docs 中所述, dispose() 应在不再需要访问广告时调用。应用变慢的原因很可能是因为广告被多次初始化而没有被释放。

关于flutter - 消息太多 - Web View 被破坏。忽略 Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64847282/

相关文章:

dart - 嵌套异步方法的抖动捕获错误

flutter - 我想在我的flutter应用程序中通过onPressed方法生成卡。谁能给我看一个路线图…?

android - Flutter:Geolocator返回在空调用方法 'compareTo'

android - AdMob 自适应横幅。从上下文中获取 DisplayMetrics

flutter - 我需要 Flutter Firebase AdMob 包的哪些 MobileAdTargetingInfo 属性才能发布?

android - 在recyclereview中添加admob原生广告

dart - 如何使用 dartdoc 生成类似 docs.flutter.io 的 Flutter 文档?

firebase - Flutter:显示来自经过身份验证的 Firebase Auth 用户的带有 StreamBuilder 的一些 Firestore 集合

flutter - 如何在 Admob 中静音插页式和奖励式视频广告?

flutter :firebase_admob 与 admob_flutter