A Flutter plugin for the Google Mobile Ads SDK

Overview

Google Mobile Ads for Flutter

This guide is intended for publishers who want to monetize a Flutter app.

Integrating Google Mobile Ads SDK into a Flutter app, which you will do here, is the first step towards displaying AdMob ads and earning revenue. Once the integration is complete, you can choose an ad format to get detailed implementation steps.

The Google Mobile Ads SDK for Flutter currently supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded video ads.

Note: This plugin also contains support for Google Ad Manager. If you are interested in creating and loading an Ad with Ad Manager, you may follow the same prerequisites, platform setup, mobile ads SDK initialization steps outlined in this doc, and then see creating and loading an ad with Ad Manager for further instructions.

See also the codelab for inline ads in Flutter for a detailed guide on setting inline banner and native ads.

Prerequisites

Import the Mobile Ads SDK

Platform Specific Setup

iOS

Update your Info.plist

Update your app's ios/Runner/Info.plist file to add two keys:

  • A GADApplicationIdentifier key with a string value of your AdMob app ID (identified in the AdMob UI).
  • A SKAdNetworkItems key with Google's SKAdNetworkIdentifier value of cstr6suwn9.skadnetwork.
<key>GADApplicationIdentifierkey>
<string>ca-app-pub-3940256099942544~1458002511string>
<key>SKAdNetworkItemskey>
  <array>
    <dict>
      <key>SKAdNetworkIdentifierkey>
      <string>cstr6suwn9.skadnetworkstring>
    dict>
  array>

See https://developers.google.com/admob/ios/quick-start#update\_your\_infoplist for more information about configuring Info.plist and setting up your App ID.

Android

Update AndroidManifest.xml

The AdMob App ID must be included in the AndroidManifest.xml. Failure to do so will result in a crash on launch of an app.

Add the AdMob App ID (identified in the AdMob UI) to the app's android/app/src/main/AndroidManifest.xml file by adding a tag with name com.google.android.gms.ads.APPLICATION_ID, as shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.

<manifest>
    <application>
        
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    application>
manifest>

The same value when you initialize the plugin in your Dart code.

See https://goo.gl/fQ2neu for more information about configuring AndroidManifest.xml and setting up the App ID.

Initialize the Mobile Ads SDK

Before loading ads, have your app initialize the Mobile Ads SDK by calling MobileAds.instance.initialize() which initializes the SDK and returns a Future that finishes once initialization is complete (or after a 30-second timeout). This needs to be done only once, ideally right before running the app.

import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:flutter/material.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  MobileAds.instance.initialize();

  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    // Load ads.
  }
}

Select an Ad Format

The Mobile Ads SDK is now imported and you're ready to implement an ad. AdMob offers a number of different ad formats, so you can choose the one that best fits your app's user experience.

  • Banner
    • Rectangular ads that appear at the top or bottom of the device screen. Banner ads stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time. If you're new to mobile advertising, they're a great place to start.
  • Interstitial
    • Full-screen ads that cover the interface of an app until closed by the user. They're best used at natural pauses in the flow of an app's execution, such as between levels of a game or just after a task is completed.
  • Native Ads
    • Customizable ads that match the look and feel of your app. You decide how and where they're placed, so the layout is more consistent with your app's design.
  • Rewarded
    • Ads that reward users for watching short videos and interacting with playable ads and surveys. Good for monetizing free-to-play users.

Banner Ads

Banner ads occupy a spot within an app's layout, either at the top or bottom of the device screen. They stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time.

This guide shows you how to integrate banner ads from AdMob into a Flutter app. In addition to code snippets and instructions, it also includes information about sizing banners properly and links to additional resources.

See also the codelab for inline ads in Flutter for a detailed guide on setting up banner ads.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for banners:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Banner Ad

A BannerAd requires an adUnitId, an AdSize, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final BannerAd myBanner = BannerAd(
  adUnitId: '',
  size: AdSize.banner,
  request: AdRequest(),
  listener: AdListener(),
);

Banner Sizes

The table below lists the standard banner sizes.

Size in dp (WxH) Description AdSize Constant
320x50 Standard Banner banner
320x100 Large Banner largeBanner
320x250 Medium Rectangle mediumRectangle
468x60 Full-Size Banner fullBanner
728x90 Leaderboard leaderboard
Screen width x 32|50|90 Smart Banner Use getSmartBanner(Orientation)

To define a custom banner size, set your desired AdSize, as shown here:

final AdSize adSize = AdSize(300, 50);

Banner Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Banner Ad

After a BannerAd is instantiated, load() must be called before it can be shown on the screen.

myBanner.load();

Display a Banner Ad

To display a BannerAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed. A BannerAd can be placed in a container with a size that matches the ad:

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: myBanner.size.width.toDouble(),
  height: myBanner.size.height.toDouble(),
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display banner ads.

Interstitial Ad

Interstitial ads are full-screen ads that cover the interface of their host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

This guide explains how to integrate interstitial ads into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for interstitials:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate an Interstitial Ad

An InterstitialAd requires an adUnitId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final InterstitialAd myInterstitial = InterstitialAd(
  adUnitId: '',
  request: AdRequest(),
  listener: AdListener(),
);

Interstitial Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Interstitial Ad

After an InterstitialAd is instantiated, load() must be called before it can be shown on the screen.

myInterstitial.load();

Display an Interstitial Ad

An InterstitialAd is displayed as an Overlay on top of all app content and is statically placed. Which means it can not be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myInterstitial.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and requires user input. Do not call show() more than once for a loaded InterstitialAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad/AdListener.onAdClosed callbacks.

That's it! Your app is now ready to display interstitial ads.

Next steps

Native Ads

Native ads are ad assets that are presented to users via UI components that are native to the platform. They're shown using the same types of views with which you're already building your layouts, and can be formatted to match the visual design of the user experience in which they live. In coding terms, this means that when a native ad loads, your app receives a NativeAd object that contains its assets, and the app (rather than the Google Mobile Ads SDK) is then responsible for displaying them.

Broadly speaking, there are two parts to successfully implementing Native Ads: loading an ad via the SDK and displaying the ad content in your app. This guide is concerned with using the SDK to load native ads.

See also the codelab for inline ads in Flutter for a detailed guide on setting up native ads.

Platform Setup

Native Ads are presented to users via UI components that are native to the platform. (e.g. A View on Android or a UIView on iOS).

Since Native Ads require UI components native to a platform, this feature requires additional setup for Android and iOS:

Android

The Android implementation of the Google Mobile Ads plugin requires a class that implements a NativeAdFactory. A NativeAdFactory contains a method that takes a UnifiedNativeAd and custom options and returns a UnifiedNativeAdView. The UnifiedNativeAdView is what will be displayed in your app.

You can implement this in your MainActivity.java or create a separate class in the same directory as MainActivity.java as seen below:

package my.app.path;

import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

class NativeAdFactoryExample implements NativeAdFactory {
  @Override
  public UnifiedNativeAdView createNativeAd(
      UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
    // Create UnifiedNativeAdView
  }
}

Each NativeAdFactory needs to be registered with a factoryId, a unique String identifier, in MainActivity.configureFlutterEngine(FlutterEngine). A NativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. The NativeAdFactory should also be unregistered in cleanUpFlutterEngine(engine) when building with add-to-app.

MainActivity.java should look similar to:

package my.app.path;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin;

public class MainActivity extends FlutterActivity {
  @Override
  public void configureFlutterEngine(FlutterEngine flutterEngine) {
    flutterEngine.getPlugins().add(new GoogleMobileAdsPlugin());
   super.configureFlutterEngine(flutterEngine);

    GoogleMobileAdsPlugin.registerNativeAdFactory(flutterEngine, "adFactoryExample", NativeAdFactoryExample());
  }

  @Override
  public void cleanUpFlutterEngine(FlutterEngine flutterEngine) {
    GoogleMobileAdsPlugin.unregisterNativeAdFactory(flutterEngine, "adFactoryExample");
  }
}

When creating the NativeAd in Dart, the factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryId. An example NativeAdFactory follows:

package io.flutter.plugins.googlemobileadsexample;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

// my_native_ad.xml can be found at
/* https://github.com/googleads/googleads-mobile-flutter/tree/master/packages/google_mobile_ads/example/android/app/src/main/res/layout
*/
class NativeAdFactoryExample implements NativeAdFactory {
 private final LayoutInflater layoutInflater;

 NativeAdFactoryExample(LayoutInflater layoutInflater) {
   this.layoutInflater = layoutInflater;
 }

 @Override
 public UnifiedNativeAdView createNativeAd(
     UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
   final UnifiedNativeAdView adView =
       (UnifiedNativeAdView) layoutInflater.inflate(R.layout.my_native_ad, null);
   final TextView headlineView = adView.findViewById(R.id.ad_headline);
   final TextView bodyView = adView.findViewById(R.id.ad_body);

   headlineView.setText(nativeAd.getHeadline());
   bodyView.setText(nativeAd.getBody());

   adView.setBackgroundColor(Color.YELLOW);

   adView.setNativeAd(nativeAd);
   adView.setBodyView(bodyView);
   adView.setHeadlineView(headlineView);
   return adView;
 }
}

iOS

The iOS implementation of the Google Mobile Ads plugin requires a class that implements a FLTNativeAdFactory. A FLTNativeAdFactory contains a method that takes a GADUnifiedNativeAd and custom options and returns a GADUnifiedNativeAdView. The GADUnifiedNativeAdView is what will be displayed in your app.

The FLTNativeAdFactory protocol can be implemented by AppDelegate or a separate class could be created as seen below:

/* AppDelegate.m */
#import "FLTGoogleMobileAdsPlugin.h"
@interface NativeAdFactoryExample : NSObject
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                             customOptions:(NSDictionary *)customOptions {
  // Create GADUnifiedNativeAdView
}
@end

Each FLTNativeAdFactory needs to be registered with a factoryId, a unique String identifier, in registerNativeAdFactory:factoryId:nativeAdFactory:. A FLTNativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. This is done by importing FLTGoogleMobileAdsPlugin.h and calling registerNativeAdFactory:factoryId:nativeAdFactory: with a FlutterPluginRegistry, a unique identifier for the factory, and the factory itself. The factory also MUST be added after [GeneratedPluginRegistrant registerWithRegistry:self]; has been called.

If this is done in AppDelegate.m, it should look similar to:

#import "FLTGoogleMobileAdsPlugin.h"

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];

  NativeAdFactoryExample *nativeAdFactory = [[NativeAdFactoryExample alloc] init];
  [FLTGoogleMobileAdsPlugin registerNativeAdFactory:self
                                        factoryId:@"adFactoryExample"
                                  nativeAdFactory:nativeAdFactory];

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

When creating the NativeAd in Dart, the factoryID will need to match the one used to add the factory to FLTGoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryID.An exampleFLTNativeAdFactory` follows:

// The example UnifiedNativeAdView.xib can be found at
/* https://github.com/googleads/googleads-mobile-flutter/blob/master/packages/google_mobile_ads/example/ios/Runner/UnifiedNativeAdView.xib
*/
@interface NativeAdFactoryExample : NSObject 
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                            customOptions:(NSDictionary *)customOptions {
 // Create and place ad in view hierarchy.
 GADUnifiedNativeAdView *adView =
     [[NSBundle mainBundle] loadNibNamed:@"UnifiedNativeAdView" owner:nil options:nil].firstObject;

 // Associate the native ad view with the native ad object. This is
 // required to make the ad clickable.
 adView.nativeAd = nativeAd;

 // Populate the native ad view with the native ad assets.
 // The headline is guaranteed to be present in every native ad.
 ((UILabel *)adView.headlineView).text = nativeAd.headline;

 // These assets are not guaranteed to be present. Check that they are before
 // showing or hiding them.
 ((UILabel *)adView.bodyView).text = nativeAd.body;
 adView.bodyView.hidden = nativeAd.body ? NO : YES;

 [((UIButton *)adView.callToActionView) setTitle:nativeAd.callToAction
                                        forState:UIControlStateNormal];
 adView.callToActionView.hidden = nativeAd.callToAction ? NO : YES;

 ((UIImageView *)adView.iconView).image = nativeAd.icon.image;
 adView.iconView.hidden = nativeAd.icon ? NO : YES;

 ((UILabel *)adView.storeView).text = nativeAd.store;
 adView.storeView.hidden = nativeAd.store ? NO : YES;

 ((UILabel *)adView.priceView).text = nativeAd.price;
 adView.priceView.hidden = nativeAd.price ? NO : YES;

 ((UILabel *)adView.advertiserView).text = nativeAd.advertiser;
 adView.advertiserView.hidden = nativeAd.advertiser ? NO : YES;

 // In order for the SDK to process touch events properly, user interaction
 // should be disabled.
 adView.callToActionView.userInteractionEnabled = NO;

 return adView;
}
@end

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for native ads:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Native Ad

A NativeAd requires an adUnitId, a factoryId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final NativeAd myNative = NativeAd(
  adUnitId: '',
  factoryId: 'adFactoryExample',
  request: AdRequest(),
  listener: AdListener(),
);

Factory Id

The factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin on Android and/or the FLTGoogleMobileAdsPlugin on iOS. The same factoryId can be used by both platforms or each can have their own.

Native Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a click is recorded for a NativeAd.
 onNativeAdClicked: (NativeAd ad) => print('Ad clicked.'),
 // Called when an impression is recorded for a NativeAd.
 onNativeAdImpression: (NativeAd ad) => print('Ad impression.'),
);

Load Native Ad

After a NativeAd is instantiated, load() must be called before it can be shown on the screen.

myNative.load();

Display a Native Ad

To display a NativeAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myNative);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed.

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: 500,
  height: 500,
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display native ads.

Next steps

Rewarded Ads

Rewarded ads are ads that users have the option of interacting with in exchange for in-app rewards. This guide shows you how to integrate rewarded ads from AdMob into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for rewarded:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Rewarded Ad

A RewardedAd requires an adUnitId, an AdRequest, and an AdListener with the onRewardedAdUserEarnedReward callback implemented. An example is shown below as well as more information on each parameter following.

final RewardedAd myRewarded = RewardedAd(
 adUnitId: '',
 request: AdRequest(),
 listener: AdListener(
   onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
     print(reward.type);
     print(reward.amount);
   },
 ),
);

Rewarded Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a RewardedAd triggers a reward.
 onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
   print('Reward earned: $reward');
 },
);

Key Point: Make sure to implement the onRewardedAdUserEarnedReward event to reward the user for watching an ad.

Load Rewarded Ad

After a RewardedAd is instantiated, load() must be called before it can be shown on the screen.

myRewarded.load();

Display a RewardedAd

A RewardedAd is displayed as an Overlay is displayed on top of all app content and is statically placed. Which means it can not be displayed this way can't be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myRewarded.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and require user input. Do not call show() more than once for a loaded RewardedAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad and AdListener.onAdClosed and callbacks.

That's it! Your app is now ready to display rewarded ads.

Creating and Loading an Ad with Ad Manager

This section shows how to create and load ads with Google Ad Manager.

Select an Ad Format

  • Banner
    • Rectangular ads that appear at the top or bottom of the device screen. Banner ads stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time. If you're new to mobile advertising, they're a great place to start.
  • Interstitial
    • Full-screen ads that cover the interface of an app until closed by the user. They're best used at natural pauses in the flow of an app's execution, such as between levels of a game or just after a task is completed.
  • Native Ads
    • Customizable ads that match the look and feel of your app. You decide how and where they're placed, so the layout is more consistent with your app's design.
  • Rewarded
    • Ads that reward users for watching short videos and interacting with playable ads and surveys. Good for monetizing free-to-play users.

PublisherAdRequest

For Ad Manager you will be using PublisherAdRequest instead of AdRequest. PublisherAdRequest is similar to AdRequest but has two additional properties: customTargeting and customTargetingLists, which are used to support custom targeting.

final PublisherAdRequest request = PublisherAdRequest(
  keywords: ['flutterio', 'beautiful apps'],
  contentUrl: 'https://flutter.dev',
  customTargeting: {'some', 'targeting'},
  customTargetingLists: >{'favoriteColors': ['red', 'yellow']},
);

Ad Manager Banner Ads

Banner ads occupy a spot within an app's layout, either at the top or bottom of the device screen. They stay on screen while users are interacting with the app, and can refresh automatically after a certain period of time.

This guide shows you how to integrate banner ads from Ad Manager into a Flutter app. In addition to code snippets and instructions, it also includes information about sizing banners properly and links to additional resources.

See also the codelab for inline ads in Flutter for a detailed guide on setting up banner ads.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for banners:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Banner Ad

A PublisherBannerAd requires an adUnitId, an AdSize, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final PublisherBannerAd myBanner = PublisherBannerAd(
  adUnitId: '',
  size: AdSize.banner,
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Banner Sizes

The table below lists the standard banner sizes.

Size in dp (WxH) Description AdSize Constant
320x50 Standard Banner banner
320x100 Large Banner largeBanner
320x250 Medium Rectangle mediumRectangle
468x60 Full-Size Banner fullBanner
728x90 Leaderboard leaderboard
Screen width x 32|50|90 Smart Banner Use getSmartBanner(Orientation)

To define a custom banner size, set your desired AdSize, as shown here:

final AdSize adSize = AdSize(300, 50);

Banner Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Banner Ad

After a PublisherBannerAd is instantiated, load() must be called before it can be shown on the screen.

myBanner.load();

Display a Banner Ad

To display a PublisherBannerAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed. A PublisherBannerAd can be placed in a container with a size that matches the ad:

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: myBanner.size.width.toDouble(),
  height: myBanner.size.height.toDouble(),
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display banner ads.

Ad Manager Interstitial Ad

Interstitial ads are full-screen ads that cover the interface of their host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

This guide explains how to integrate interstitial ads into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for interstitials:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate an Interstitial Ad

A PublisherInterstitialAd requires an adUnitId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final PublisherInterstitialAd myInterstitial = PublisherInterstitialAd(
  adUnitId: '',
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Interstitial Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
);

Load Interstitial Ad

After a PublisherInterstitialAd is instantiated, load() must be called before it can be shown on the screen.

myInterstitial.load();

Display an Interstitial Ad

A PublisherInterstitialAd is displayed as an Overlay on top of all app content and is statically placed. Which means it can not be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myInterstitial.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and requires user input. Do not call show() more than once for a loaded PublisherInterstitialAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad/AdListener.onAdClosed callbacks.

That's it! Your app is now ready to display interstitial ads.

Next steps

Ad Manager Native Ads

Native ads are ad assets that are presented to users via UI components that are native to the platform. They're shown using the same types of views with which you're already building your layouts, and can be formatted to match the visual design of the user experience in which they live. In coding terms, this means that when a native ad loads, your app receives a NativeAd object that contains its assets, and the app (rather than the Google Mobile Ads SDK) is then responsible for displaying them.

Broadly speaking, there are two parts to successfully implementing Native Ads: loading an ad via the SDK and displaying the ad content in your app. This guide is concerned with using the SDK to load native ads.

See also the codelab for inline ads in Flutter for a detailed guide on setting up native ads.

Platform Setup

Native Ads are presented to users via UI components that are native to the platform. (e.g. A View on Android or a UIView on iOS).

Since Native Ads require UI components native to a platform, this feature requires additional setup for Android and iOS:

Android

The Android implementation of the Google Mobile Ads plugin requires a class that implements a NativeAdFactory. A NativeAdFactory contains a method that takes a UnifiedNativeAd and custom options and returns a UnifiedNativeAdView. The UnifiedNativeAdView is what will be displayed in your app.

You can implement this in your MainActivity.java or create a separate class in the same directory as MainActivity.java as seen below:

package my.app.path;

import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

class NativeAdFactoryExample implements NativeAdFactory {
  @Override
  public UnifiedNativeAdView createNativeAd(
      UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
    // Create UnifiedNativeAdView
  }
}

Each NativeAdFactory needs to be registered with a factoryId, a unique String identifier, in MainActivity.configureFlutterEngine(FlutterEngine). A NativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. The NativeAdFactory should also be unregistered in cleanUpFlutterEngine(engine) when building with add-to-app.

MainActivity.java should look similar to:

package my.app.path;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin;

public class MainActivity extends FlutterActivity {
  @Override
  public void configureFlutterEngine(FlutterEngine flutterEngine) {
    flutterEngine.getPlugins().add(new GoogleMobileAdsPlugin());
   super.configureFlutterEngine(flutterEngine);

    GoogleMobileAdsPlugin.registerNativeAdFactory(flutterEngine, "adFactoryExample", NativeAdFactoryExample());
  }

  @Override
  public void cleanUpFlutterEngine(FlutterEngine flutterEngine) {
    GoogleMobileAdsPlugin.unregisterNativeAdFactory(flutterEngine, "adFactoryExample");
  }
}

When creating the NativeAd in Dart, the factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryId. An example NativeAdFactory follows:

package io.flutter.plugins.googlemobileadsexample;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.google.android.gms.ads.formats.UnifiedNativeAd;
import com.google.android.gms.ads.formats.UnifiedNativeAdView;
import io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.NativeAdFactory;
import java.util.Map;

// my_native_ad.xml can be found at
/* https://github.com/googleads/googleads-mobile-flutter/tree/master/packages/google_mobile_ads/example/android/app/src/main/res/layout
*/
class NativeAdFactoryExample implements NativeAdFactory {
 private final LayoutInflater layoutInflater;

 NativeAdFactoryExample(LayoutInflater layoutInflater) {
   this.layoutInflater = layoutInflater;
 }

 @Override
 public UnifiedNativeAdView createNativeAd(
     UnifiedNativeAd nativeAd, Map<String, Object> customOptions) {
   final UnifiedNativeAdView adView =
       (UnifiedNativeAdView) layoutInflater.inflate(R.layout.my_native_ad, null);
   final TextView headlineView = adView.findViewById(R.id.ad_headline);
   final TextView bodyView = adView.findViewById(R.id.ad_body);

   headlineView.setText(nativeAd.getHeadline());
   bodyView.setText(nativeAd.getBody());

   adView.setBackgroundColor(Color.YELLOW);

   adView.setNativeAd(nativeAd);
   adView.setBodyView(bodyView);
   adView.setHeadlineView(headlineView);
   return adView;
 }
}

iOS

The iOS implementation of the Google Mobile Ads plugin requires a class that implements a FLTNativeAdFactory. A FLTNativeAdFactory contains a method that takes a GADUnifiedNativeAd and custom options and returns a GADUnifiedNativeAdView. The GADUnifiedNativeAdView is what will be displayed in your app.

The FLTNativeAdFactory protocol can be implemented by AppDelegate or a separate class could be created as seen below:

/* AppDelegate.m */
#import "FLTGoogleMobileAdsPlugin.h"
@interface NativeAdFactoryExample : NSObject
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                             customOptions:(NSDictionary *)customOptions {
  // Create GADUnifiedNativeAdView
}
@end

Each FLTNativeAdFactory needs to be registered with a factoryId, a unique String identifier, in registerNativeAdFactory:factoryId:nativeAdFactory:. A FLTNativeAdFactory can be implemented and registered for each unique Native ad layout used by your app or a single one can handle all layouts. This is done by importing FLTGoogleMobileAdsPlugin.h and calling registerNativeAdFactory:factoryId:nativeAdFactory: with a FlutterPluginRegistry, a unique identifier for the factory, and the factory itself. The factory also MUST be added after [GeneratedPluginRegistrant registerWithRegistry:self]; has been called.

If this is done in AppDelegate.m, it should look similar to:

#import "FLTGoogleMobileAdsPlugin.h"

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];

  NativeAdFactoryExample *nativeAdFactory = [[NativeAdFactoryExample alloc] init];
  [FLTGoogleMobileAdsPlugin registerNativeAdFactory:self
                                        factoryId:@"adFactoryExample"
                                  nativeAdFactory:nativeAdFactory];

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

When creating the NativeAd in Dart, the factoryID will need to match the one used to add the factory to FLTGoogleMobileAdsPlugin. In the above code snippet, adFactoryExample is the name of the factoryID.An exampleFLTNativeAdFactory` follows:

// The example UnifiedNativeAdView.xib can be found at
/* https://github.com/googleads/googleads-mobile-flutter/blob/master/packages/google_mobile_ads/example/ios/Runner/UnifiedNativeAdView.xib
*/
@interface NativeAdFactoryExample : NSObject 
@end

@implementation NativeAdFactoryExample
- (GADUnifiedNativeAdView *)createNativeAd:(GADUnifiedNativeAd *)nativeAd
                            customOptions:(NSDictionary *)customOptions {
 // Create and place ad in view hierarchy.
 GADUnifiedNativeAdView *adView =
     [[NSBundle mainBundle] loadNibNamed:@"UnifiedNativeAdView" owner:nil options:nil].firstObject;

 // Associate the native ad view with the native ad object. This is
 // required to make the ad clickable.
 adView.nativeAd = nativeAd;

 // Populate the native ad view with the native ad assets.
 // The headline is guaranteed to be present in every native ad.
 ((UILabel *)adView.headlineView).text = nativeAd.headline;

 // These assets are not guaranteed to be present. Check that they are before
 // showing or hiding them.
 ((UILabel *)adView.bodyView).text = nativeAd.body;
 adView.bodyView.hidden = nativeAd.body ? NO : YES;

 [((UIButton *)adView.callToActionView) setTitle:nativeAd.callToAction
                                        forState:UIControlStateNormal];
 adView.callToActionView.hidden = nativeAd.callToAction ? NO : YES;

 ((UIImageView *)adView.iconView).image = nativeAd.icon.image;
 adView.iconView.hidden = nativeAd.icon ? NO : YES;

 ((UILabel *)adView.storeView).text = nativeAd.store;
 adView.storeView.hidden = nativeAd.store ? NO : YES;

 ((UILabel *)adView.priceView).text = nativeAd.price;
 adView.priceView.hidden = nativeAd.price ? NO : YES;

 ((UILabel *)adView.advertiserView).text = nativeAd.advertiser;
 adView.advertiserView.hidden = nativeAd.advertiser ? NO : YES;

 // In order for the SDK to process touch events properly, user interaction
 // should be disabled.
 adView.callToActionView.userInteractionEnabled = NO;

 return adView;
}
@end

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for native ads:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Native Ad

A NativeAd requires an adUnitId, a factoryId, an AdRequest, and an AdListener. An example is shown below as well as more information on each parameter following.

final NativeAd myNative = NativeAd.fromPublisherRequest(
  adUnitId: '',
  factoryId: 'adFactoryExample',
  request: PublisherAdRequest(),
  listener: AdListener(),
);

Factory Id

The factoryId will need to match the one used to add the factory to GoogleMobileAdsPlugin on Android and/or the FLTGoogleMobileAdsPlugin on iOS. The same factoryId can be used by both platforms or each can have their own.

Native Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) => print('Ad closed.'),
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a click is recorded for a NativeAd.
 onNativeAdClicked: (NativeAd ad) => print('Ad clicked.'),
 // Called when an impression is recorded for a NativeAd.
 onNativeAdImpression: (NativeAd ad) => print('Ad impression.'),
);

Load Native Ad

After a NativeAd is instantiated, load() must be called before it can be shown on the screen.

myNative.load();

Display a Native Ad

To display a NativeAd as a widget, you must instantiate an AdWidget with a supported ad after calling load(). You can create the widget before calling load(), but load() must be called before adding it to the widget tree.

final AdWidget adWidget = AdWidget(ad: myBanner);

AdWidget inherits from Flutter's Widget class and can be used as any other widget. On iOS, make sure you place the widget in a widget with a specified width and height. Otherwise, your Ad may not be displayed.

final Container adContainer = Container(
  alignment: Alignment.center,
  child: adWidget,
  width: 500,
  height: 500,
);

Once an Ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is either after the AdWidget is removed from the widget tree or in the AdListener.onAdFailedToLoad callback.

That's it! Your app is now ready to display native ads.

Next steps

Ad Manager Rewarded Ads

Rewarded ads are ads that users have the option of interacting with in exchange for in-app rewards. This guide shows you how to integrate rewarded ads from Ad Manager into a Flutter app.

Always test with test ads

When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.

The easiest way to load test ads is to use our dedicated test ad unit ID for rewarded:

It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.

Instantiate a Rewarded Ad

A RewardedAd requires an adUnitId, an AdRequest, and an AdListener with the onRewardedAdUserEarnedReward callback implemented. An example is shown below as well as more information on each parameter following.

final RewardedAd myRewarded = RewardedAd.fromPublisherRequest(
 adUnitId: '',
 request: PublisherAdRequest(),
 listener: AdListener(
   onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
     print(reward.type);
     print(reward.amount);
   },
 ),
);

Rewarded Ad Events

Through the use of AdListener, you can listen for lifecycle events, such as when an ad is closed or the user leaves the app. This example implements each method and logs a message to the console:

final AdListener listener = AdListener(
 // Called when an ad is successfully received.
 onAdLoaded: (Ad ad) => print('Ad loaded.'),
 // Called when an ad request failed.
 onAdFailedToLoad: (Ad ad, LoadAdError error) {
   ad.dispose();
   print('Ad failed to load: $error');
 },
 // Called when an ad opens an overlay that covers the screen.
 onAdOpened: (Ad ad) => print('Ad opened.'),
 // Called when an ad removes an overlay that covers the screen.
 onAdClosed: (Ad ad) {
   ad.dispose();
   print('Ad closed.');
 },
 // Called when an ad is in the process of leaving the application.
 onApplicationExit: (Ad ad) => print('Left application.'),
 // Called when a RewardedAd triggers a reward.
 onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {
   print('Reward earned: $reward');
 },
);

Key Point: Make sure to implement the onRewardedAdUserEarnedReward event to reward the user for watching an ad.

Load Rewarded Ad

After a RewardedAd is instantiated, load() must be called before it can be shown on the screen.

myRewarded.load();

Display a RewardedAd

A RewardedAd is displayed as an Overlay is displayed on top of all app content and is statically placed. Which means it can not be displayed this way can't be added to the Flutter widget tree. You can choose when to show the add by calling show() after the ad is loaded.

myRewarded.show();

This method should only be called after load() and the AdListener.onAdLoaded method has been triggered. Once show() is called, an Ad displayed this way can't be removed programmatically and require user input. Do not call show() more than once for a loaded RewardedAd. Instead you should load a new ad.

Once an ad has called load(), it must call dispose() when access to it is no longer needed. The best practice for when to call dispose() is in the AdListener.onAdFailedToLoad and AdListener.onAdClosed and callbacks.

That's it! Your app is now ready to display rewarded ads.

Next Steps

Targeting

The RequestConfiguration object collects the global configuration for every ad request and is applied by MobileAds.instance.updateRequestConfiguration().

Child-directed setting

For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called "tag for child-directed treatment."

As an app developer, you can indicate whether you want Google to treat your content as child-directed when you make an ad request. If you indicate that you want Google to treat your content as child-directed, we take steps to disable IBA and remarketing ads on that ad request. The setting can be used with all versions of the Google Play services SDK via RequestConfiguration.tagForChildDirectedTreatment():

  • Use the argument TagForChildDirectedTreatment.yes to indicate that you want your content treated as child-directed for the purposes of COPPA.
  • Use the argument TagForChildDirectedTreatment.no to indicate that you don't want your content treated as child-directed for the purposes of COPPA.
  • Use the argument TagForChildDirectedTreatment.unspecified or do not set this tag if you do not wish to indicate how you would like your content treated with respect to COPPA in ad requests.

The following example indicates that you want your content treated as child-directed for purposes of COPPA:

final RequestConfiguration requestConfiguration = RequestConfiguration(
  tagForChildDirectedTreatment: TagForChildDirectedTreatment.yes);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);

Users under the age of consent

You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent. This feature is designed to help facilitate compliance with the General Data Protection Regulation (GDPR). Note that you may have other legal obligations under GDPR. Please review the European Union’s guidance and consult with your own legal counsel. Please remember that Google's tools are designed to facilitate compliance and do not relieve any particular publisher of its obligations under the law. Learn more about how the GDPR affects publishers.

When using this feature, a Tag For Users under the Age of Consent in Europe (TFUA) parameter will be included in the ad request. This parameter disables personalized advertising, including remarketing, for that specific ad request. It also disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad servers.

The setting can be used via RequestConfiguration.tagForUnderAgeOfConsent():

  • Use the argument TagForUnderAgeOfConsent.yes to indicate that you want the request configuration to be handled in a manner suitable for users under the age of consent.
  • Use the argument TagForUnderAgeOfConsent.no to indicates that you don't want the request configuration to be handled in a manner suitable for users under the age of consent.
  • Use the argument TagForUnderAgeOfConsent.unspecified or do not set this tag to indicate that you have not specified whether the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent. The following example indicates that you want TFUA included in your ad request:
final RequestConfiguration requestConfiguration = RequestConfiguration(
  tagForUnderAgeOfConsent: TagForUnderAgeOfConsent.yes);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);

The tags to enable the Child-directed setting and setTagForUnderAgeOfConsent should not both simultaneously be set to true. If they are, the child-directed setting takes precedence.

Ad Content Filtering

The setting can be set via RequestConfiguration.maxAdContentRating():

AdMob ads returned for these requests have a content rating at or below that level. The possible values for this network extra are based on digital content label classifications, and should be one of the following MaxAdContentRating objects:

  • MaxAdContentRating.g
  • MaxAdContentRating.pg
  • MaxAdContentRating.t
  • MaxAdContentRating.ma

The following code configures a RequestConfiguration object to specify that ad content returned should correspond to a digital content label designation no higher than G:

final RequestConfiguration requestConfiguration = RequestConfiguration(
  maxAdContentRating: MaxAdContentRating.g);
MobileAds.instance.updateRequestConfiguration(requestConfiguration);
Issues
  • Android inline ad performance

    Android inline ad performance

    There have been a number of complaints about performance of inline banner and native ads on Android:

    • https://github.com/googleads/googleads-mobile-flutter/issues/167
    • https://github.com/googleads/googleads-mobile-flutter/issues/75
    • https://github.com/googleads/googleads-mobile-flutter/issues/80
    • https://github.com/googleads/googleads-mobile-flutter/issues/231
    • https://github.com/googleads/googleads-mobile-flutter/issues/239

    As mentioned in https://github.com/googleads/googleads-mobile-flutter/issues/80#issuecomment-803621668, performance is noticeably worse on Android 9 and below. This is related to use of hybrid composition, which is a requirement due to technical constraints.

    Currentworkarounds are to constrict inline ads to android 10 and above, or only to only use fixed position banner/native ads.

    bug performance p2-medium e3-weeks platform-android 
    opened by jjliu15 87
  • 🐛 Low performance when using AdWidget

    🐛 Low performance when using AdWidget

    Bug report

    After adding AdWidget to widget tree overall app performance is low.

    Steps to reproduce

    Steps to reproduce the behavior:

    I've building BannerAd and AdWidget in follow way:

    
      BannerAd getBannerAd() {
        BannerAd bannerAd = BannerAd(
          size: AdSize.fullBanner,
          adUnitId: Config.adMobBannerIdTest,
          listener: AdListener(
            onAdFailedToLoad: (ad, error) {
              ad.dispose();
            },
          ),
          request: AdRequest(
              nonPersonalizedAds: _sharedPrefs.isPersonalizedAds() == false,),
        );
        bannerAd.load();
        return bannerAd;
      }
    
      Widget buildAdWidget(BannerAd? bannerAd){
        if(bannerAd != null){
          AdWidget adWidget = AdWidget(ad: bannerAd);
          return Container(
            alignment: Alignment.center,
            child: adWidget,
            width: bannerAd.size.width.toDouble(),
            height: bannerAd.size.height.toDouble(),
          );
        }else
          return SizedBox();
      }
    

    Then in when I add AdWidget to screen performance is low. I've added simple check to determine if its fault of AdWidget and it seems its the problem:

        Widget adContainer = false ? SizedBox() : _adMobHelper!.buildAdWidget(bannerAd);
        return Scaffold(
          body: Column(
            children: [
              Expanded(
                child: IndexedStack(
                  index: _currentIndex,
                  children: _children,
                ),
              ),
              adContainer
    
            ],
          ),
    ...rest of code, rather not important
    

    Expected behavior

    None to low impact on performance


    Additional context

    While I was using firebase_admob everything worked smooth


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel beta, 2.0.1, on Microsoft Windows [Version 10.0.18363.1440], locale en-US)
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [√] Chrome - develop for the web
    [√] Android Studio (version 4.1.0)
    [√] Connected device (3 available)
    
    • No issues found!
    
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.12.0
    Flutter SDK 2.0.1
    bmi_calculator 1.0.2+5
    
    dependencies:
    - android_alarm_manager 0.4.5+20 [flutter]
    - catex 0.0.1+6 [flutter meta]
    - clip_shadow 0.2.1 [flutter]
    - cupertino_icons 1.0.2
    - devicelocale 0.3.3 [flutter]
    - firebase_analytics 7.1.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
    - firebase_core 1.0.1 [firebase_core_platform_interface firebase_core_web flutter meta]
    - firebase_crashlytics 1.0.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
    - firebase_remote_config 0.9.0-dev.0 [flutter firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface]
    - fl_chart 0.20.1 [flutter path_drawing equatable pedantic]
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - flutter_html 2.0.0-nullsafety.0 [html csslib css_colors flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter]
    - flutter_local_notifications 5.0.0-nullsafety.1 [flutter flutter_local_notifications_platform_interface platform timezone]
    - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
    - flutter_settings_screens 0.2.1+1 [flutter flutter_material_color_picker path_provider provider shared_preferences]
    - flutter_speed_dial 1.2.5 [flutter]
    - fluttertoast 3.1.3 [flutter]
    - freezed 0.12.7 [analyzer build build_config meta source_gen freezed_annotation]
    - google_fonts 1.1.2 [flutter http path_provider crypto]
    - google_mobile_ads 0.11.0+3 [meta flutter]
    - google_sign_in 5.0.0 [google_sign_in_platform_interface google_sign_in_web flutter meta]
    - googleapis 0.56.1 [_discoveryapis_commons http]
    - in_app_purchase 0.5.1 [flutter json_annotation meta collection]
    - intl 0.17.0 [clock path]
    - json_annotation 4.0.0
    - mockito 4.1.4 [analyzer build code_builder collection dart_style matcher meta source_gen test_api]
    - package_info 0.4.3+2 [flutter]
    - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
    - provider 5.0.0 [collection flutter nested]
    - rate_my_app 1.0.0+2 [shared_preferences pedantic flutter]
    - rxdart 0.22.2
    - sembast 2.1.0 [meta path synchronized]
    - shared_preferences 2.0.4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
    - simple_tooltip 0.1.14 [flutter]
    - url_launcher 6.0.2 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web]
    - workmanager 0.2.3 [flutter]
    
    dev dependencies:
    - build_runner 1.11.0 [args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style glob graphs http_multi_server io js logging meta mime path pedantic pool pub_semver pubspe
    c_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    - json_serializable 4.0.2 [analyzer build build_config json_annotation meta path source_gen]
    
    transitive dependencies:
    - _discoveryapis_commons 0.2.0 [http]
    - _fe_analyzer_shared 14.0.0 [meta]
    - analyzer 0.41.2 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
    - args 1.6.0
    - async 2.5.0 [collection]
    - boolean_selector 2.1.0 [source_span string_scanner]
    - build 1.6.2 [analyzer async convert crypto glob logging meta path]
    - build_config 0.4.5 [checked_yaml json_annotation meta path pubspec_parse yaml]
    - build_daemon 2.1.9 [built_collection built_value http_multi_server logging pedantic path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
    - build_resolvers 1.5.3 [analyzer build crypto graphs logging meta path package_config pool pub_semver]
    - build_runner_core 6.1.7 [async build build_config build_resolvers collection convert crypto glob graphs logging meta path package_config pedantic pool timing watcher yaml]
    - built_collection 5.0.0
    - built_value 8.0.2 [built_collection collection fixnum]
    - characters 1.1.0
    - charcode 1.2.0
    - checked_yaml 1.0.4 [json_annotation source_span yaml]
    - chewie 1.0.0 [cupertino_icons flutter video_player wakelock]
    - chewie_audio 1.2.0 [cupertino_icons flutter video_player]
    - cli_util 0.2.0 [path]
    - clock 1.1.0
    - code_builder 3.7.0 [built_collection built_value collection matcher meta]
    - collection 1.15.0
    - convert 2.1.1 [charcode typed_data]
    - crypto 2.1.5 [collection convert typed_data]
    - css_colors 1.1.0 [flutter]
    - csslib 0.17.0 [source_span]
    - dart_style 1.3.10 [analyzer args path source_span]
    - equatable 2.0.0 [collection meta]
    - fake_async 1.2.0 [clock collection]
    - ffi 1.0.0
    - file 6.1.0 [meta path]
    - firebase 7.3.3 [http http_parser js]
    - firebase_analytics_platform_interface 1.1.0 [flutter meta]
    - firebase_analytics_web 0.2.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
    - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
    - firebase_core_web 1.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
    - firebase_crashlytics_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_remote_config_platform_interface 0.2.0-dev.0 [flutter meta firebase_core plugin_platform_interface]
    - fixnum 1.0.0
    - flutter_layout_grid 1.0.0-nullsafety.6 [flutter collection meta quiver]
    - flutter_local_notifications_platform_interface 3.0.0-nullsafety.4 [flutter plugin_platform_interface]
    - flutter_material_color_picker 1.0.5 [flutter]
    - flutter_svg 0.21.0-nullsafety.0 [flutter meta path_drawing vector_math xml]
    - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
    - freezed_annotation 0.14.0 [collection json_annotation meta]
    - glob 1.2.0 [async collection node_io path pedantic string_scanner]
    - google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
    - google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
    - graphs 0.2.0
    - html 0.15.0 [csslib source_span]
    - http 0.12.2 [http_parser path pedantic]
    - http_multi_server 2.2.0 [async]
    - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
    - io 0.3.4 [charcode meta path string_scanner]
    - js 0.6.3
    - logging 0.11.4
    - matcher 0.12.10 [stack_trace]
    - meta 1.3.0
    - mime 0.9.7
    - nested 1.0.0 [flutter]
    - node_interop 1.1.1 [js]
    - node_io 1.1.1 [node_interop path]
    - package_config 1.9.3 [path charcode]
    - path 1.8.0
    - path_drawing 0.5.0-nullsafety.0 [vector_math meta path_parsing flutter]
    - path_parsing 0.2.0-nullsafety.0 [vector_math meta]
    - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
    - path_provider_macos 2.0.0 [flutter]
    - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
    - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32]
    - pedantic 1.11.0
    - petitparser 4.0.2 [meta]
    - platform 3.0.0
    - plugin_platform_interface 2.0.0 [meta]
    - pool 1.4.0 [async stack_trace]
    - process 4.1.0 [file path platform]
    - pub_semver 1.4.4 [collection]
    - pubspec_parse 0.1.8 [checked_yaml json_annotation pub_semver yaml]
    - quiver 3.0.0 [matcher]
    - shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
    - shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
    - shared_preferences_platform_interface 2.0.0 [flutter]
    - shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
    - shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
    - shelf 0.7.9 [async collection http_parser path stack_trace stream_channel]
    - shelf_web_socket 0.2.3 [shelf web_socket_channel stream_channel]
    - sky_engine 0.0.99
    - source_gen 0.9.10+3 [analyzer async build dart_style glob meta path pedantic source_span]
    - source_span 1.8.0 [charcode collection path term_glyph]
    - stack_trace 1.10.0 [path]
    - stream_channel 2.1.0 [async]
    - stream_transform 1.2.0
    - string_scanner 1.1.0 [charcode source_span]
    - synchronized 2.2.0+2
    - term_glyph 1.2.0
    - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - timezone 0.7.0-nullsafety.0 [path]
    - timing 0.1.1+3 [json_annotation]
    - typed_data 1.3.0 [collection]
    - url_launcher_linux 2.0.0 [flutter]
    - url_launcher_macos 2.0.0 [flutter]
    - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface]
    - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
    - url_launcher_windows 2.0.0 [flutter]
    - vector_math 2.1.0
    - video_player 2.0.2 [meta video_player_platform_interface video_player_web flutter flutter_test]
    - video_player_platform_interface 4.0.0 [flutter meta flutter_test]
    - video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface]
    - wakelock 0.4.0 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web]
    - wakelock_macos 0.1.0 [flutter flutter_web_plugins wakelock_platform_interface]
    - wakelock_platform_interface 0.2.0 [flutter meta]
    - wakelock_web 0.2.0 [flutter flutter_web_plugins js wakelock_platform_interface]
    - watcher 0.9.7+15 [async path pedantic]
    - web_socket_channel 1.1.0 [async crypto stream_channel]
    - webview_flutter 2.0.2 [flutter]
    - win32 2.0.0 [ffi]
    - xdg_directories 0.2.0 [meta path process]
    - xml 5.0.2 [collection meta petitparser]
    - yaml 2.2.1 [charcode collection string_scanner source_span]
    

    duplicate 
    opened by kuba91 38
  • All apps using googleads-mobile-flutter getting blocked for

    All apps using googleads-mobile-flutter getting blocked for "Ad Fraud"

    I have 12 apps,

    6 of flutter and 6 native.

    all 6 of flutter getting blocked for ad fraud by AdMob, and all other native everything totally fine. I'm doing the same in all apps, one interstitial ad on splash and that's it.

    Maybe somehow it's the library? I can't find any reasonable solution for this issue

    opened by dvird 36
  • Displaying an AdWidget with another Platform view like GoogleMap or WebView freeze those views.

    Displaying an AdWidget with another Platform view like GoogleMap or WebView freeze those views.

    Bug report

    (Android only. iOS seems fine) I've got a screen containing a Platform view widget (Google Maps and/or WebView) As soon as the Adwidget is displayed (=once the load method is called), the others platform views freeze = i can not interact/scroll inside them anymore.

    Steps to reproduce

    Steps to reproduce the behavior:

    Use those packages: google_maps_flutter: ^1.2.0 google_mobile_ads: ^0.11.0+1 webview_flutter: ^1.0.7

    Use this code :

    import 'package:google_mobile_ads/google_mobile_ads.dart';
    import 'package:google_maps_flutter/google_maps_flutter.dart';
    import 'package:webview_flutter/webview_flutter.dart';
    
    import 'ad_state.dart';
    
    class AdPage extends StatefulWidget {
      AdPage({Key key}) : super(key: key);
    
      @override
      _AdPageState createState() => _AdPageState();
    }
    
    class _AdPageState extends State<AdPage> {
      BannerAd banner;
      bool isLoading = false;
    
      @override
      void initState() {
        super.initState();
        
        banner = BannerAd(
          adUnitId: BannerAd.testAdUnitId,
          size: AdSize.banner,
          request: AdRequest(),
          listener: AdState.adListener,
        ); //..load();
        
        Future<void>.delayed(
            Duration(seconds: 15),
            () => setState(() {
                  banner?.load();
                  isLoading = true;
                }));
      }
    
      @override
      Widget build(BuildContext context) {
        return Column(
          children: [
            Container(
              height: 300,
              child: WebView(
                javascriptMode: JavascriptMode.unrestricted,
                initialUrl: "https://www.flutter.dev",
              ),
            ),
            Container(
              height: 300,
              child: GoogleMap(
                  initialCameraPosition:
                      CameraPosition(target: LatLng(46.0, -0.36), zoom: 15.0)),
            ),
            Container(
              height: 50,
              child: isLoading ? AdWidget(ad: banner) : null,
            ),
          ],
        );
      }
    }
    

    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale fr-FR)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    [!] Android Studio (version 4.1)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [!] VS Code (version 1.53.1)
        ✗ Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    [✓] Connected device (1 available)
    
    ! Doctor found issues in 2 categories.
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.10.5
    Flutter SDK 1.22.6
    google_mobile_ads_bug 1.0.0+1
    
    dependencies:
    - cupertino_icons 1.0.0
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - google_maps_flutter 1.2.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface]
    - google_mobile_ads 0.11.0+1 [meta flutter]
    - provider 4.3.3 [collection flutter nested]
    - webview_flutter 1.0.7 [flutter]
    
    dev dependencies:
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    
    transitive dependencies:
    - async 2.5.0-nullsafety.1 [collection]
    - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
    - characters 1.1.0-nullsafety.3
    - charcode 1.2.0-nullsafety.1
    - clock 1.1.0-nullsafety.1
    - collection 1.15.0-nullsafety.3
    - fake_async 1.2.0-nullsafety.1 [clock collection]
    - flutter_plugin_android_lifecycle 1.0.11 [flutter]
    - google_maps_flutter_platform_interface 1.2.0 [flutter meta plugin_platform_interface stream_transform collection]
    - matcher 0.12.10-nullsafety.1 [stack_trace]
    - meta 1.3.0-nullsafety.3
    - nested 0.0.4 [flutter]
    - path 1.8.0-nullsafety.1
    - plugin_platform_interface 1.0.3 [meta]
    - sky_engine 0.0.99
    - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
    - stack_trace 1.10.0-nullsafety.1 [path]
    - stream_channel 2.1.0-nullsafety.1 [async]
    - stream_transform 1.2.0
    - string_scanner 1.1.0-nullsafety.1 [charcode source_span]
    - term_glyph 1.2.0-nullsafety.1
    - test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - typed_data 1.3.0-nullsafety.3 [collection]
    - vector_math 2.1.0-nullsafety.3
    

    bug p2-medium e3-weeks platform-android 
    opened by sperochon 26
  • 🐛 [Banner Ad] 'Fatal Exception: NSInvalidArgumentException' in iOS

    🐛 [Banner Ad] 'Fatal Exception: NSInvalidArgumentException' in iOS

    Bug report

    Describe the bug The iOS (Swift) app crashes randomly, but often, when banners are loaded with the error:

    Fatal Exception: NSInvalidArgumentException
    *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
    

    Stack Trace

    Fatal Exception: NSInvalidArgumentException
    0  CoreFoundation                 0x1a4b33180 __exceptionPreprocess
    1  libobjc.A.dylib                0x1a3d0b9f8 objc_exception_throw
    2  CoreFoundation                 0x1a4aacbec _CFArgv
    3  CoreFoundation                 0x1a4a34898 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
    4  CoreFoundation                 0x1a4a25474 +[NSDictionary dictionaryWithObjects:forKeys:count:]
    5  Runner                         0x1012cff2c -[FLTAdInstanceManager onAdLoaded:] + 82 (FLTAdInstanceManager_Internal.m:82)
    6  Runner                         0x1012ce174 -[FLTBannerAd adViewDidReceiveAd:] + 150 (FLTAd_Internal.m:150)
    7  Runner                         0x1011d4824 GAD_GADBannerView_arm64_7_69_0
    8  Runner                         0x10122a058 __copy_helper_block_e8_32s40s48s56s64b72w
    9  Runner                         0x10122a114 __copy_helper_block_e8_32s40s48s56s64b72w
    10 Runner                         0x101229d08 GAD_GADInternalBannerView_arm64_7_69_0
    11 Runner                         0x1012298d0 GAD_GADInternalBannerView_arm64_7_69_0
    12 Runner                         0x101229f80 GAD_GADInternalBannerView_arm64_7_69_0
    13 libdispatch.dylib              0x1a4570a38 _dispatch_call_block_and_release
    14 libdispatch.dylib              0x1a45717d4 _dispatch_client_callout
    15 libdispatch.dylib              0x1a451f008 _dispatch_main_queue_callback_4CF$VARIANT$mp
    16 CoreFoundation                 0x1a4ac4b20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
    17 CoreFoundation                 0x1a4abfa58 __CFRunLoopRun
    18 CoreFoundation                 0x1a4abefb4 CFRunLoopRunSpecific
    19 GraphicsServices               0x1a6cc079c GSEventRunModal
    20 UIKitCore                      0x1d1320c38 UIApplicationMain
    21 Runner                         0x100fb37d8 main + 6 (AppDelegate.swift:6)
    22 libdyld.dylib                  0x1a45828e0 start
    

    Steps to reproduce

    Steps to reproduce the behavior:

    1. Create a Flutter project (Swift).
    2. Insert an inline banner as described in the codelabs (in a ListView).
    3. The error will appear randomly.

    Expected behavior

    The app should not crash.


    Additional context

    I have not been able to reproduce the error continuously but many of my users have encountered it as I can see from the crashlytics logs.

    I have mediation with MoPub, Facebook Audience Network and AdColony configured but the error also occurs if I pause it.


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    [✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15.7 19H2 darwin-x64, locale it-IT)
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.1)
    [✓] VS Code (version 1.54.3)
    [✓] Connected device (3 available)
    
    • No issues found!
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    Dart SDK 2.12.2
    Flutter SDK 2.0.3
    
    dependencies:
    - admob_consent 1.1.2 [flutter]
    - apple_sign_in 0.1.0 [flutter]
    - async 2.5.0 [collection]
    - auto_size_text 2.1.0 [flutter]
    - cached_network_image 3.0.0-nullsafety [flutter flutter_cache_manager octo_image]
    - camera 0.8.0 [flutter camera_platform_interface pedantic quiver]
    - carousel_slider 3.0.0 [flutter]
    - circular_check_box 1.0.4 [flutter]
    - cloud_firestore 1.0.2 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta]
    - connectivity_widget 0.1.7 [flutter rxdart connectivity stream_disposable http]
    - cupertino_icons 1.0.2
    - dio 4.0.0-prev3 [http_parser path]
    - easy_debounce 1.0.2 [flutter]
    - equatable 2.0.0 [collection meta]
    - expandable 5.0.1 [flutter]
    - extended_image 3.0.0 [extended_image_library flutter meta]
    - firebase_analytics 7.1.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
    - firebase_auth 1.0.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
    - firebase_core 1.0.2 [firebase_core_platform_interface firebase_core_web flutter meta]
    - firebase_crashlytics 1.0.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
    - firebase_messaging 9.0.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
    - firebase_storage 8.0.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
    - flag 5.0.0-nullsafety [flutter flutter_svg]
    - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
    - flutter_facebook_auth 3.1.1 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web]
    - flutter_image_compress 0.7.0 [flutter]
    - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
    - flutter_rating_bar 4.0.0 [flutter]
    - flutter_signin_button 2.0.0-nullsafety.0 [flutter font_awesome_flutter]
    - font_awesome_flutter 9.0.0 [flutter]
    - get 3.26.0 [flutter]
    - google_fonts 2.0.0 [flutter http path_provider crypto]
    - google_mobile_ads 0.11.0+4 [meta flutter]
    - google_sign_in 5.0.1 [google_sign_in_platform_interface google_sign_in_web flutter meta]
    - http 0.13.1 [http_parser meta path pedantic]
    - image 3.0.2 [archive meta xml]
    - image_editor 1.0.0 [flutter]
    - image_gallery_saver 1.6.8 [flutter]
    - image_picker 0.7.3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface image_picker_for_web]
    - in_app_review 2.0.1 [flutter in_app_review_platform_interface]
    - intl 0.17.0 [clock path]
    - intl_utils 2.1.0 [analyzer archive args http intl path petitparser yaml]
    - introduction_screen 2.0.0 [flutter dots_indicator]
    - isolate 2.0.3
    - lottie 1.0.1 [archive characters charcode collection flutter logging meta path vector_math]
    - matrix4_transform 2.0.0 [flutter]
    - modal_bottom_sheet 2.0.0 [flutter]
    - native_shared_preferences 1.0.5 [flutter meta]
    - ndialog 4.0.1 [flutter]
    - ntp 1.0.8 [universal_io]
    - package_info 2.0.0 [flutter]
    - page_view_indicators 2.0.0 [flutter]
    - path_drawing 0.5.0-nullsafety.0 [vector_math meta path_parsing flutter]
    - path_provider 2.0.1 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
    - permission_handler 6.1.1 [flutter meta permission_handler_platform_interface]
    - photo_view 0.11.1 [flutter]
    - provider 5.0.0 [collection flutter nested]
    - purchases_flutter 3.1.0 [flutter collection]
    - rxdart 0.26.0
    - screenshot 0.3.0 [flutter]
    - share_plus 2.0.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
    - shared_preferences 2.0.5 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
    - svg_path_parser 1.0.0 [string_scanner flutter]
    - syncfusion_flutter_charts 18.4.49 [flutter intl vector_math syncfusion_flutter_core]
    - timeago 3.0.2
    - trotter 1.2.0
    - url_launcher 6.0.2 [flutter url_launcher_platform_interface url_launcher_linux url_launcher_macos url_launcher_windows url_launcher_web]
    - video_player 2.0.2 [meta video_player_platform_interface video_player_web flutter flutter_test]
    
    transitive dependencies:
    - _fe_analyzer_shared 19.0.0 [meta]
    - analyzer 1.3.0 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic]
    - archive 3.1.2 [crypto path]
    - args 2.0.0
    - boolean_selector 2.1.0 [source_span string_scanner]
    - camera_platform_interface 2.0.1 [flutter meta plugin_platform_interface cross_file stream_transform]
    - characters 1.1.0
    - charcode 1.2.0
    - cli_util 0.3.0 [meta path]
    - clock 1.1.0
    - cloud_firestore_platform_interface 4.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - cloud_firestore_web 1.0.2 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
    - collection 1.15.0
    - connectivity 3.0.3 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web]
    - connectivity_for_web 0.4.0 [connectivity_platform_interface flutter_web_plugins flutter]
    - connectivity_macos 0.2.0 [flutter]
    - connectivity_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
    - convert 3.0.0 [typed_data]
    - cross_file 0.3.1+1 [flutter meta]
    - crypto 3.0.0 [collection typed_data]
    - dots_indicator 2.0.0 [flutter]
    - extended_image_library 2.0.2 [crypto flutter http_client_helper path path_provider]
    - fake_async 1.2.0 [clock collection]
    - ffi 1.0.0
    - file 6.1.0 [meta path]
    - firebase 9.0.1 [http http_parser js]
    - firebase_analytics_platform_interface 1.1.0 [flutter meta]
    - firebase_analytics_web 0.2.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
    - firebase_auth_platform_interface 4.0.0 [firebase_core flutter meta plugin_platform_interface]
    - firebase_auth_web 1.0.3 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
    - firebase_core_platform_interface 4.0.0 [flutter meta plugin_platform_interface]
    - firebase_core_web 1.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
    - firebase_crashlytics_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_messaging_platform_interface 2.0.1 [firebase_core flutter meta plugin_platform_interface]
    - firebase_messaging_web 1.0.2 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
    - firebase_storage_platform_interface 2.0.0 [collection firebase_core flutter meta plugin_platform_interface]
    - firebase_storage_web 1.0.2 [async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
    - flutter_blurhash 0.5.4-nullsafety.0 [flutter meta pedantic]
    - flutter_cache_manager 3.0.0-nullsafety.2 [clock collection file flutter http image path path_provider pedantic rxdart sqflite uuid]
    - flutter_facebook_auth_platform_interface 2.1.1 [flutter plugin_platform_interface]
    - flutter_facebook_auth_web 2.1.1 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface]
    - flutter_plugin_android_lifecycle 2.0.0 [flutter]
    - flutter_svg 0.21.0-nullsafety.0 [flutter meta path_drawing vector_math xml]
    - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
    - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
    - glob 2.0.0 [async collection file path pedantic string_scanner]
    - google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
    - google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
    - http_client_helper 2.0.2 [http]
    - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
    - image_picker_for_web 2.0.0 [image_picker_platform_interface meta flutter flutter_web_plugins]
    - image_picker_platform_interface 2.0.1 [flutter meta http plugin_platform_interface]
    - in_app_review_platform_interface 2.0.2 [flutter url_launcher plugin_platform_interface platform]
    - js 0.6.3
    - logging 1.0.0
    - matcher 0.12.10 [stack_trace]
    - meta 1.3.0
    - mime 1.0.0
    - nested 1.0.0 [flutter]
    - octo_image 1.0.0-nullsafety.1 [flutter flutter_blurhash]
    - package_config 2.0.0 [path]
    - path 1.8.0
    - path_parsing 0.2.0-nullsafety.0 [vector_math meta]
    - path_provider_linux 2.0.0 [path xdg_directories path_provider_platform_interface flutter]
    - path_provider_macos 2.0.0 [flutter]
    - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface]
    - path_provider_windows 2.0.0 [path_provider_platform_interface meta path flutter ffi win32]
    - pedantic 1.11.0
    - permission_handler_platform_interface 3.1.1 [flutter meta plugin_platform_interface]
    - petitparser 4.0.2 [meta]
    - platform 3.0.0
    - plugin_platform_interface 2.0.0 [meta]
    - process 4.2.0 [file path platform]
    - pub_semver 2.0.0 [collection]
    - quiver 3.0.0 [matcher]
    - share_plus_linux 2.0.0 [share_plus_platform_interface file flutter meta url_launcher]
    - share_plus_macos 2.0.0 [share_plus_platform_interface flutter]
    - share_plus_platform_interface 2.0.0 [flutter meta mime plugin_platform_interface]
    - share_plus_web 2.0.0 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
    - share_plus_windows 2.0.0 [share_plus_platform_interface flutter meta url_launcher]
    - shared_preferences_linux 2.0.0 [flutter file meta path path_provider_linux shared_preferences_platform_interface]
    - shared_preferences_macos 2.0.0 [shared_preferences_platform_interface flutter]
    - shared_preferences_platform_interface 2.0.0 [flutter]
    - shared_preferences_web 2.0.0 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
    - shared_preferences_windows 2.0.0 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows]
    - sky_engine 0.0.99
    - source_span 1.8.0 [charcode collection path term_glyph]
    - sqflite 2.0.0+3 [flutter sqflite_common path]
    - sqflite_common 2.0.0+2 [synchronized path meta]
    - stack_trace 1.10.0 [path]
    - stream_channel 2.1.0 [async]
    - stream_disposable 0.1.0 [flutter]
    - stream_transform 2.0.0
    - string_scanner 1.1.0 [charcode source_span]
    - syncfusion_flutter_core 18.4.49 [flutter]
    - synchronized 3.0.0
    - term_glyph 1.2.0
    - test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
    - typed_data 1.3.0 [collection]
    - universal_io 1.0.1 [meta zone_local]
    - url_launcher_linux 2.0.0 [flutter]
    - url_launcher_macos 2.0.0 [flutter]
    - url_launcher_platform_interface 2.0.2 [flutter plugin_platform_interface]
    - url_launcher_web 2.0.0 [url_launcher_platform_interface meta flutter flutter_web_plugins]
    - url_launcher_windows 2.0.0 [flutter]
    - uuid 3.0.2 [crypto]
    - vector_math 2.1.0
    - video_player_platform_interface 4.0.0 [flutter meta flutter_test]
    - video_player_web 2.0.0 [flutter flutter_web_plugins meta video_player_platform_interface]
    - watcher 1.0.0 [async path pedantic]
    - win32 2.0.4 [ffi]
    - xdg_directories 0.2.0 [meta path process]
    - xml 5.0.2 [collection meta petitparser]
    - yaml 3.1.0 [collection source_span string_scanner]
    - zone_local 0.1.2
    

    opened by diegocom 25
  • [Interstitial] Ad not closed on back button : blocking point for playstore production !

    [Interstitial] Ad not closed on back button : blocking point for playstore production !

    Plugin Version

    google_mobile_ads: ^0.12.1+1

    Steps to Reproduce

    class HomePage extends StatefulWidget {
      @override
      _HomePageState createState() => _HomePageState();
    }
    
    class _HomePageState extends State<HomePage> {
    
      @override
      Widget build(BuildContext context) {
        return InterstitielPage(
          enabled: true,
          child: Scaffold(
            appBar: AppBar(),
            body: Center(child: Text("This ads will not be closed when back button id pressed (we need to spam it)"),),
          ),
        );
      }
    }
    
    import 'package:flutter/material.dart';
    import 'package:google_mobile_ads/google_mobile_ads.dart';
    
    class InterstitielPage extends StatefulWidget {
      final Widget child;
      final bool enabled;
    
      const InterstitielPage({Key key, this.child, this.enabled = true}) : super(key: key);
    
      @override
      _InterstitielPageState createState() => _InterstitielPageState();
    }
    
    class _InterstitielPageState extends State<InterstitielPage> {
      InterstitialAd interstitialAd;
    
      @override
      void dispose() {
        interstitialAd?.dispose();
        super.dispose();
      }
    
      @override
      void initState() {
        if (widget.enabled) WidgetsBinding.instance.addPostFrameCallback((_) => getAd());
        super.initState();
      }
    
      bool get isReady => mounted && WidgetsBinding.instance.lifecycleState == AppLifecycleState.resumed;
    
      getAd() {
        if (!isReady) return null;
        interstitialAd = InterstitialAd(
          adUnitId: "ca-app-pub-3940256099942544/1033173712",
          listener: AdListener(
            onAdLoaded: (Ad ad) {
              if (isReady) interstitialAd.show();
            },
            onAdClosed: (Ad ad) {
              ad.dispose();
              print('Ad closed.');
            },
            onAdFailedToLoad: (Ad ad, error) {
              ad.dispose();
              print('Ad failed to load: $error');
            },
            onApplicationExit: (Ad ad) => print('Left application.'),
          ),
          request: AdRequest(),
        );
        if (isReady) interstitialAd?.load();
        setState(() {});
      }
    
      @override
      Widget build(BuildContext context) => widget.child;
    }
    

    Expected results:

    When i press the back button I would see the interstitial closed. Because of that, PlayStore refuse to publish my app :

    Your app is not compliant with the Ad Fraud policy. Ad fraud is strictly prohibited. Ads should not appear after the user has exited the app, or after the user has pressed the back button to exit the app
    

    Not that some of my apps were accepted to production but got the error, maybe next release they will be blocked ! The log & video to well understand the issue.

    Actual results:

    It persist but disappear after around 10-20 try... Maybe about a timer...

    Logs
    [   +8 ms] I/Ads     ( 3992): Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("2E9CBE21F7A722_CENSORED_ID_FOR_GUTHUB_ISSUE")) to get test ads on this device.
    [  +23 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [   +1 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; (greylist, linking, allowed)
    [   +6 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->peekLong(JZ)J (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->pokeLong(JJZ)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->pokeInt(JIZ)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->peekInt(JZ)I (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->pokeByte(JB)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->peekByte(J)B (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->pokeByteArray(J[BII)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Llibcore/io/Memory;->peekByteArray(J[BII)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->arrayIndexScale(Ljava/lang/Class;)I (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, reflection, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, reflection, allowed)
    [  +12 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
    [   +5 ms] I/DynamiteModule( 3992): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule( 3992): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [   +9 ms] I/DynamiteModule( 3992): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] W/Parcel  ( 3992): **** enforceInterface() expected 'com.google.android.gms.ads.clearcut.IClearcut' but read 'com.google.android.gms.gass.internal.clearcut.IClearcut'
    [        ] I/DynamiteModule( 3992): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [   +2 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [        ] W/Parcel  ( 3992): **** enforceInterface() expected 'com.google.android.gms.ads.clearcut.IClearcut' but read 'com.google.android.gms.gass.internal.clearcut.IClearcut'
    [   +1 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
    [        ] I/DynamiteModule( 3992): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule( 3992): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [  +15 ms] W/tal.my_app_censored_name( 3992): ClassLoaderContext classpath element mismatch. expected=/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk, found=/data/app/com.eg_digital.my_app_censored_names-9j_X88jfmQkXURtSx6kFJA==/base.apk (PCL[];PCL[/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk*856532249:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes2.dex*333229941:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes3.dex*264764970:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes4.dex*12996791:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes5.dex*449296825:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes6.dex*1160111402:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes7.dex*312131232:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.apk!classes8.dex*2800897254:/data/app/com.eg_digital.my_app_censored_names-LJJZ0itP-Vkbpspd0yiobw==/base.
    [  +11 ms] W/tal.my_app_censored_name( 3992): Found duplicate classes, falling back to extracting from APK : /data/user/0/com.eg_digital.my_app_censored_names/app_pccache/5/7145086C2DF9AD170940815BEFAA500FA517C4D3/pcam.jar
    [        ] W/tal.my_app_censored_name( 3992): NOTE: This wastes RAM and hurts startup performance.
    [        ] W/tal.my_app_censored_name( 3992): Found duplicated class when checking oat files: 'Lcom/google/errorprone/annotations/CanIgnoreReturnValue;' in /data/app/com.eg_digital.my_app_censored_names-9j_X88jfmQkXURtSx6kFJA==/base.apk!classes3.dex and /data/user/0/com.eg_digital.my_app_censored_names/app_pccache/5/7145086C2DF9AD170940815BEFAA500FA517C4D3/pcam.jar
    [        ] W/tal.my_app_censored_name( 3992): 
    [        ] I/AudioManager( 3992): In isSpeakerphoneOn(), calling application: com.eg_digital.my_app_censored_names
    [   +3 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [  +21 ms] W/AdWorker(Defaul( 3992): type=1400 audit(0.0:11298): avc: granted { execute } for path="/data/data/com.eg_digital.my_app_censored_names/app_pccache/5/7145086C2DF9AD170940815BEFAA500FA517C4D3/pcam.jar" dev="sda32" ino=2050239 scontext=u:r:untrusted_app:s0:c192,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c192,c257,c512,c768 tclass=file
    [   +4 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +44 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [  +16 ms] W/Ads     ( 3992): Not retrying to fetch app settings
    [ +590 ms] D/EgretLoader( 3992): EgretLoader(Context context)
    [        ] D/EgretLoader( 3992): The context is not activity
    [  +11 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [   +7 ms] D/EgretLoader( 3992): EgretLoader(Context context)
    [        ] D/EgretLoader( 3992): The context is not activity
    [ +119 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +36 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [  +25 ms] I/tal.my_app_censored_name( 3992): Background concurrent copying GC freed 73449(5345KB) AllocSpace objects, 32(1200KB) LOS objects, 49% free, 6688KB/13MB, paused 2.398ms total 149.740ms
    [  +19 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [ +130 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
    [   +1 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +15 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +40 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [  +76 ms] I/DynamiteModule( 3992): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule( 3992): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [   +6 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [  +15 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +24 ms] I/Timeline( 3992): Timeline: Activity_launch_request time:9577764
    [  +27 ms] I/WonderPush.IAM.Headless( 3992): Removing display event component
    [   +3 ms] W/ActivityThread( 3992): handleWindowVisibility: no activity for token [email protected]
    [  +16 ms] D/DynamitePackage( 3992): Instantiating com.google.android.gms.ads.ChimeraAdOverlayCreatorImpl
    [   +5 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [        ] D/ForceDarkHelper( 3992): updateByCheckExcludeList: pkg: com.eg_digital.my_app_censored_names activity: [email protected]
    [   +5 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +8 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [        ] D/ForceDarkHelper( 3992): updateByCheckExcludeList: pkg: com.eg_digital.my_app_censored_names activity: [email protected]
    [        ] D/ForceDarkHelper( 3992): updateByCheckExcludeList: pkg: com.eg_digital.my_app_censored_names activity: [email protected]
    [  +22 ms] I/chatty  ( 3992): uid=10448(com.eg_digital.my_app_censored_names) identical 2 lines
    [   +4 ms] D/ForceDarkHelper( 3992): updateByCheckExcludeList: pkg: com.eg_digital.my_app_censored_names activity: [email protected]
    [        ] I/WonderPush.IAM.Headless( 3992): Setting display event component
    [   +6 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +32 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +18 ms] W/ContentCatcher( 3992): Failed to notify a WebView
    [        ] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +3 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +49 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +141 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
    [        ] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [  +19 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [        ] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +1 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +256 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +2 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [   +1 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +1 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +256 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [        ] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +193 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +2 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +208 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +5 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +235 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9579292, downTime=9579292, deviceId=-1, source=0x101, displayId=-1 }
    [   +1 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9579292, downTime=9579292, deviceId=-1, source=0x101, displayId=-1 }
    [ +189 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +2 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +350 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9579836, downTime=9579836, deviceId=-1, source=0x101, displayId=-1 }
    [   +3 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9579836, downTime=9579836, deviceId=-1, source=0x101, displayId=-1 }
    [ +465 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +2 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [+1613 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +6 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [+1773 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9583694, downTime=9583694, deviceId=-1, source=0x101, displayId=-1 }
    [        ] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9583694, downTime=9583694, deviceId=-1, source=0x101, displayId=-1 }
    [ +280 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    [   +4 ms] W/tal.my_app_censored_name( 3992): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
    [ +283 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9584267, downTime=9584267, deviceId=-1, source=0x101, displayId=-1 }
    [   +3 ms] D/ViewRootImpl( 3992): [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x8, repeatCount=0, eventTime=9584267, downTime=9584267, deviceId=-1, source=0x101, displayId=-1 }
    [+1782 ms] D/AudioManager( 3992): getStreamVolume isRestricted mode = 0
    
    No issue.
    
    [√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [version 10.0.19042.964], locale fr-FR)
        • Flutter version 2.0.6 at C:\Users\censored_for_github_issue\Documents\Softwares\flutter
        • Framework revision 1d9032c7e1 (5 days ago), 2021-04-29 17:37:58 -0700
        • Engine revision 05e680e202
        • Dart version 2.12.3
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at D:\Android\Sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: C:\Users\censored_for_github_issue\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7199119\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.0)
        • Visual Studio at D:\dev
        • Visual Studio Community 2019 version 16.9.31025.194
        • Windows 10 SDK version 10.0.19041.0
    
    [√] Android Studio (version 4.1.0)
        • Android Studio at C:\Users\censored_for_github_issue\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7199119
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [√] IntelliJ IDEA Ultimate Edition (version 2021.1)
        • IntelliJ at C:\Users\censored_for_github_issue\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\211.7142.45
        • Flutter plugin version 56.0.5
        • Dart plugin version 211.7233
    
    [√] Connected device (4 available)
        • Mi 9T (mobile)    • c8d2a7bf • android-arm64  • Android 10 (API 29)
        • Windows (desktop) • windows  • windows-x64    • Microsoft Windows [version 10.0.19042.964]
        • Chrome (web)      • chrome   • web-javascript • Google Chrome 90.0.4430.93
        • Edge (web)        • edge     • web-javascript • Microsoft Edge 89.0.774.77
    
    • No issues found!
    
    

    https://user-images.githubusercontent.com/37028599/117120537-bbf31580-ad93-11eb-81f3-b295d29a014b.mp4

    opened by EArminjon 22
  • Error -> No ad config.

    Error -> No ad config.

    Plugin Version

    ^0.12.1+1

    Steps to Reproduce

    1. Run the app with an Android device.
    2. Expect to have ads but instead you get error.

    Expected results: Getting a banner.

    Actual results:

    I/Ads     (14188): Ad failed to load : 3
    I/flutter (14188): LoadAdError(code: 3, domain: com.google.android.gms.ads, message: No ad config.)
    

    I followed all the steps that is given in documents, not working.

    You can also check the project => https://github.com/ragokan/adapp

    image

    Logs
    
    ➜  adapp git:(master) ✗ flutter run --verbose
    [  +79 ms] executing: [/home/rago/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [  +41 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [        ] adc687823a831bbebe28bdccfac1a628ca621513
    [        ] executing: [/home/rago/snap/flutter/common/flutter/] git tag --points-at adc687823a831bbebe28bdccfac1a628ca621513
    [  +24 ms] Exit code 0 from: git tag --points-at adc687823a831bbebe28bdccfac1a628ca621513
    [        ] 2.0.5
    [  +64 ms] executing: [/home/rago/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [        ] origin/stable
    [        ] executing: [/home/rago/snap/flutter/common/flutter/] git ls-remote --get-url origin
    [   +4 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] https://github.com/flutter/flutter.git
    [  +55 ms] executing: [/home/rago/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
    [   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [        ] stable
    [  +78 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +86 ms] executing: /home/rago/Android/Sdk/platform-tools/adb devices -l
    [  +57 ms] List of devices attached
               emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:2
    [   +8 ms] /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop
    [  +39 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [   +4 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +91 ms] Skipping pub get: version match.
    [  +35 ms] Found plugin google_mobile_ads at /home/rago/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/google_mobile_ads-0.12.1+1/
    [ +136 ms] Found plugin google_mobile_ads at /home/rago/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/google_mobile_ads-0.12.1+1/
    [  +46 ms] Generating /home/rago/Videos/Flutta/adapp/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
    [  +91 ms] ro.hardware = ranchu
    [  +19 ms] Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
    [  +41 ms] Initializing file store
    [  +17 ms] Skipping target: gen_localizations
    [   +6 ms] complete
    [   +9 ms] Launching lib/main.dart on AOSP on IA Emulator in debug mode...
    [  +12 ms] /home/rago/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/rago/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
    /home/rago/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata --output-dill /tmp/flutter_tools.FDIIJF/flutter_tool.ESDUSB/app.dill --packages
    /home/rago/Videos/Flutta/adapp/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/cache.dill.track.dill
    [  +24 ms] executing: /home/rago/Android/Sdk/build-tools/30.0.3/aapt dump xmltree /home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
    [  +12 ms] Exit code 0 from: /home/rago/Android/Sdk/build-tools/30.0.3/aapt dump xmltree /home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
    [        ] N: android=http://schemas.android.com/apk/res/android
                 E: manifest (line=2)
                   A: android:versionCode(0x0101021b)=(type 0x10)0x1
                   A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
                   A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
                   A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
                   A: package="com.example.adapp" (Raw: "com.example.adapp")
                   A: platformBuildVersionCode=(type 0x10)0x1e
                   A: platformBuildVersionName=(type 0x10)0xb
                   E: uses-sdk (line=7)
                     A: android:minSdkVersion(0x0101020c)=(type 0x10)0x14
                     A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
                   E: uses-permission (line=14)
                     A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
                   E: uses-permission (line=15)
                     A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
                   E: queries (line=16)
                     E: intent (line=19)
                       E: action (line=20)
                         A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                       E: category (line=22)
                         A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                       E: data (line=24)
                         A: android:scheme(0x01010027)="https" (Raw: "https")
                     E: intent (line=28)
                       E: action (line=29)
                         A: android:name(0x01010003)="android.support.customtabs.action.CustomTabsService" (Raw: "android.support.customtabs.action.CustomTabsService")
                   E: uses-permission (line=34)
                     A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
                   E: uses-permission (line=35)
                     A: android:name(0x01010003)="android.permission.RECEIVE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
                   E: application (line=37)
                     A: android:label(0x01010001)="adapp" (Raw: "adapp")
                     A: android:icon(0x01010002)[email protected]
                     A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                     A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                     E: activity (line=42)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.example.adapp.MainActivity" (Raw: "com.example.adapp.MainActivity")
                       A: android:launchMode(0x0101001d)=(type 0x10)0x1
                       A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                       A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                       A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                       E: meta-data (line=56)
                         A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                         A: android:resource(0x01010025)[email protected]
                       E: meta-data (line=66)
                         A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                         A: android:resource(0x01010025)[email protected]
                       E: intent-filter (line=70)
                         E: action (line=71)
                           A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                         E: category (line=73)
                           A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                     E: meta-data (line=80)
                       A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                       A: android:value(0x01010024)=(type 0x10)0x2
                     E: meta-data (line=83)
                       A: android:name(0x01010003)="com.google.android.gms.ads.APPLICATION_ID" (Raw: "com.google.android.gms.ads.APPLICATION_ID")
                       A: android:value(0x01010024)="ca-app-pub-3940256099942544~3347511713" (Raw: "ca-app-pub-3940256099942544~3347511713")
                     E: meta-data (line=86)
                       A: android:name(0x01010003)="io.flutter.embedded_views_preview" (Raw: "io.flutter.embedded_views_preview")
                       A: android:value(0x01010024)=(type 0x12)0xffffffff
                     E: activity (line=89)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdActivity" (Raw: "com.google.android.gms.ads.AdActivity")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:configChanges(0x0101001f)=(type 0x11)0xfb0
                     E: provider (line=95)
                       A: android:name(0x01010003)="com.google.android.gms.ads.MobileAdsInitProvider" (Raw: "com.google.android.gms.ads.MobileAdsInitProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.example.adapp.mobileadsinitprovider" (Raw: "com.example.adapp.mobileadsinitprovider")
                       A: android:initOrder(0x0101001a)=(type 0x10)0x64
                     E: service (line=101)
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdService" (Raw: "com.google.android.gms.ads.AdService")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                     E: meta-data (line=106)
                       A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                       A: android:value(0x01010024)[email protected]
                     E: provider (line=110)
                       A: android:name(0x01010003)="androidx.work.impl.WorkManagerInitializer" (Raw: "androidx.work.impl.WorkManagerInitializer")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:multiprocess(0x01010013)=(type 0x12)0xffffffff
                       A: android:authorities(0x01010018)="com.example.adapp.workmanager-init" (Raw: "com.example.adapp.workmanager-init")
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=117)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.SystemAlarmService" (Raw: "androidx.work.impl.background.systemalarm.SystemAlarmService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=122)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemjob.SystemJobService" (Raw: "androidx.work.impl.background.systemjob.SystemJobService")
                       A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=129)
                       A: android:name(0x01010003)="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver" (Raw: "androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=134)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=139)
                         E: action (line=140)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_CONNECTED" (Raw: "android.intent.action.ACTION_POWER_CONNECTED")
                         E: action (line=141)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_DISCONNECTED" (Raw: "android.intent.action.ACTION_POWER_DISCONNECTED")
                     E: receiver (line=144)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=149)
                         E: action (line=150)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_OKAY" (Raw: "android.intent.action.BATTERY_OKAY")
                         E: action (line=151)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_LOW" (Raw: "android.intent.action.BATTERY_LOW")
                     E: receiver (line=154)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=159)
                         E: action (line=160)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_LOW" (Raw: "android.intent.action.DEVICE_STORAGE_LOW")
                         E: action (line=161)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_OK" (Raw: "android.intent.action.DEVICE_STORAGE_OK")
                     E: receiver (line=164)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=169)
                         E: action (line=170)
                           A: android:name(0x01010003)="android.net.conn.CONNECTIVITY_CHANGE" (Raw: "android.net.conn.CONNECTIVITY_CHANGE")
                     E: receiver (line=173)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.RescheduleReceiver" (Raw: "androidx.work.impl.background.systemalarm.RescheduleReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=178)
                         E: action (line=179)
                           A: android:name(0x01010003)="android.intent.action.BOOT_COMPLETED" (Raw: "android.intent.action.BOOT_COMPLETED")
                         E: action (line=180)
                           A: android:name(0x01010003)="android.intent.action.TIME_SET" (Raw: "android.intent.action.TIME_SET")
                         E: action (line=181)
                           A: android:name(0x01010003)="android.intent.action.TIMEZONE_CHANGED" (Raw: "android.intent.action.TIMEZONE_CHANGED")
                     E: receiver (line=184)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=189)
                         E: action (line=190)
                           A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.UpdateProxies" (Raw: "androidx.work.impl.background.systemalarm.UpdateProxies")
                     E: service (line=194)
                       A: android:name(0x01010003)="androidx.room.MultiInstanceInvalidationService" (Raw: "androidx.room.MultiInstanceInvalidationService")
                       A: android:exported(0x01010010)=(type 0x12)0x0
    [  +19 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
    [  +24 ms] <- compile package:adapp/main.dart
    [  +74 ms] --------- beginning of main
               05-05 18:30:44.720 I/GnssLocationProvider( 1902): WakeLock released by handleMessage(REPORT_SV_STATUS, 0, [email protected]45297)
    [  +16 ms] executing: /home/rago/Android/Sdk/platform-tools/adb version
    [   +8 ms] Android Debug Bridge version 1.0.41
               Version 31.0.2-7242960
               Installed as /home/rago/Android/Sdk/platform-tools/adb
    [   +6 ms] executing: /home/rago/Android/Sdk/platform-tools/adb start-server
    [  +18 ms] Building APK
    [  +35 ms] Running Gradle task 'assembleDebug'...
    [   +8 ms] Using gradle from /home/rago/Videos/Flutta/adapp/android/gradlew.
    [   +1 ms] /home/rago/Videos/Flutta/adapp/android/gradlew mode: 33277 rwxrwxr-x.
    [   +6 ms] executing: /snap/android-studio/current/android-studio/jre/bin/java -version
    [ +114 ms] Exit code 0 from: /snap/android-studio/current/android-studio/jre/bin/java -version
    [        ] openjdk version "1.8.0_242-release"
               OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
               OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
    [   +1 ms] executing: [/home/rago/Videos/Flutta/adapp/android/] /home/rago/Videos/Flutta/adapp/android/gradlew -Pverbose=true -Ptarget-platform=android-x86 -Ptarget=/home/rago/Videos/Flutta/adapp/lib/main.dart -Ptrack-widget-creation=true
    -Pfilesystem-scheme=org-dartlang-root assembleDebug
    [+3532 ms] > Task :app:compileFlutterBuildDebug
    [        ] [  +83 ms] executing: [/home/rago/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [   +1 ms] [  +65 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [        ] [        ] adc687823a831bbebe28bdccfac1a628ca621513
    [        ] [        ] executing: [/home/rago/snap/flutter/common/flutter/] git tag --points-at adc687823a831bbebe28bdccfac1a628ca621513
    [        ] [  +19 ms] Exit code 0 from: git tag --points-at adc687823a831bbebe28bdccfac1a628ca621513
    [        ] [        ] 2.0.5
    [        ] [  +42 ms] executing: [/home/rago/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [        ] [   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [  +15 ms] [        ] origin/stable
    [        ] [        ] executing: [/home/rago/snap/flutter/common/flutter/] git ls-remote --get-url origin
    [        ] [   +4 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] [        ] https://github.com/flutter/flutter.git
    [        ] [  +46 ms] executing: [/home/rago/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
    [        ] [   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [        ] [        ] stable
    [        ] [  +56 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [        ] [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [        ] [  +77 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
    [        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
    [        ] [  +97 ms] Initializing file store
    [        ] [  +20 ms] Skipping target: gen_localizations
    [        ] [   +8 ms] kernel_snapshot: Starting due to {}
    [  +17 ms] [  +10 ms] /home/rago/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/rago/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
    /home/rago/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages
    /home/rago/Videos/Flutta/adapp/.dart_tool/package_config.json --output-dill /home/rago/Videos/Flutta/adapp/.dart_tool/flutter_build/d7cca561495dbb0c15c73195dfef6a2c/app.dill --depfile
    /home/rago/Videos/Flutta/adapp/.dart_tool/flutter_build/d7cca561495dbb0c15c73195dfef6a2c/kernel_snapshot.d package:adapp/main.dart
    [+9832 ms] [+10996 ms] kernel_snapshot: Complete
    [ +500 ms] [ +435 ms] debug_android_application: Starting due to {}
    [ +199 ms] [ +253 ms] debug_android_application: Complete
    [ +599 ms] [ +607 ms] Persisting file store
    [        ] [   +7 ms] Done persisting file store
    [        ] [   +7 ms] build succeeded.
    [  +99 ms] [  +11 ms] "flutter assemble" took 12,566ms.
    [        ] [   +4 ms] ensureAnalyticsSent: 0ms
    [        ] [   +1 ms] Running shutdown hooks
    [        ] [        ] Shutdown hooks complete
    [        ] [        ] exiting with code 0
    [ +199 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
    [        ] > Task :app:preBuild UP-TO-DATE
    [        ] > Task :app:preDebugBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:preBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:preDebugBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugAidl NO-SOURCE
    [        ] > Task :app:compileDebugAidl NO-SOURCE
    [        ] > Task :google_mobile_ads:packageDebugRenderscript NO-SOURCE
    [        ] > Task :app:compileDebugRenderscript NO-SOURCE
    [        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
    [        ] > Task :google_mobile_ads:writeDebugAarMetadata UP-TO-DATE
    [  +98 ms] > Task :app:checkDebugAarMetadata UP-TO-DATE
    [        ] > Task :app:cleanMergeDebugAssets
    [        ] > Task :app:mergeDebugShaders UP-TO-DATE
    [        ] > Task :app:compileDebugShaders NO-SOURCE
    [   +1 ms] > Task :app:generateDebugAssets UP-TO-DATE
    [   +4 ms] > Task :google_mobile_ads:mergeDebugShaders UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugShaders NO-SOURCE
    [        ] > Task :google_mobile_ads:generateDebugAssets UP-TO-DATE
    [        ] > Task :google_mobile_ads:packageDebugAssets UP-TO-DATE
    [  +91 ms] > Task :app:mergeDebugAssets
    [ +299 ms] > Task :app:copyFlutterAssetsDebug
    [        ] > Task :app:generateDebugResValues UP-TO-DATE
    [        ] > Task :app:generateDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugRenderscript NO-SOURCE
    [        ] > Task :google_mobile_ads:generateDebugResValues UP-TO-DATE
    [        ] > Task :google_mobile_ads:generateDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:packageDebugResources UP-TO-DATE
    [        ] > Task :app:mergeDebugResources UP-TO-DATE
    [        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
    [        ] > Task :app:extractDeepLinksDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:extractDeepLinksDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:processDebugManifest UP-TO-DATE
    [        ] > Task :app:processDebugMainManifest UP-TO-DATE
    [        ] > Task :app:processDebugManifest UP-TO-DATE
    [        ] > Task :app:processDebugManifestForPackage UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugLibraryResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:parseDebugLocalResources UP-TO-DATE
    [  +96 ms] > Task :google_mobile_ads:generateDebugRFile UP-TO-DATE
    [  +99 ms] > Task :app:processDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:generateDebugBuildConfig UP-TO-DATE
    [        ] > Task :google_mobile_ads:javaPreCompileDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugJavaWithJavac UP-TO-DATE
    [        ] > Task :google_mobile_ads:bundleLibCompileToJarDebug UP-TO-DATE
    [  +99 ms] > Task :app:compileDebugKotlin UP-TO-DATE
    [   +1 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
    [        ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
    [        ] > Task :app:compileDebugSources UP-TO-DATE
    [        ] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
    [   +2 ms] > Task :app:processDebugJavaRes NO-SOURCE
    [   +7 ms] > Task :google_mobile_ads:processDebugJavaRes NO-SOURCE
    [        ] > Task :google_mobile_ads:bundleLibResDebug NO-SOURCE
    [        ] > Task :app:mergeDebugJavaResource UP-TO-DATE
    [  +85 ms] > Task :google_mobile_ads:bundleLibRuntimeToJarDebug UP-TO-DATE
    [  +99 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
    [        ] > Task :app:dexBuilderDebug UP-TO-DATE
    [        ] > Task :app:desugarDebugFileDependencies UP-TO-DATE
    [  +99 ms] > Task :app:mergeExtDexDebug UP-TO-DATE
    [        ] > Task :app:mergeDexDebug UP-TO-DATE
    [        ] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugJniLibFolders UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugNativeLibs NO-SOURCE
    [        ] > Task :google_mobile_ads:stripDebugDebugSymbols NO-SOURCE
    [        ] > Task :google_mobile_ads:copyDebugJniLibsProjectOnly UP-TO-DATE
    [  +98 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
    [        ] > Task :app:stripDebugDebugSymbols UP-TO-DATE
    [        ] > Task :app:validateSigningDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:copyDebugJniLibsProjectAndLocalJars UP-TO-DATE
    [        ] > Task :google_mobile_ads:extractDebugAnnotations UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugGeneratedProguardFiles UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugConsumerProguardFiles UP-TO-DATE
    [        ] > Task :google_mobile_ads:prepareLintJarForPublish UP-TO-DATE
    [  +97 ms] > Task :google_mobile_ads:mergeDebugJavaResource UP-TO-DATE
    [        ] > Task :google_mobile_ads:syncDebugLibJars UP-TO-DATE
    [        ] > Task :google_mobile_ads:bundleDebugAar UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugSources UP-TO-DATE
    [        ] > Task :google_mobile_ads:assembleDebug UP-TO-DATE
    [ +598 ms] > Task :app:compressDebugAssets
    [ +699 ms] > Task :app:packageDebug
    [ +177 ms] > Task :app:assembleDebug
    [        ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    [        ] Use '--warning-mode all' to show the individual deprecation warnings.
    [        ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
    [        ] BUILD SUCCESSFUL in 17s
    [        ] 57 actionable tasks: 7 executed, 50 up-to-date
    [ +361 ms] Running Gradle task 'assembleDebug'... (completed in 18.3s)
    [ +202 ms] calculateSha: LocalDirectory: '/home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk'/app.apk
    [  +49 ms] calculateSha: reading file took 48us
    [ +728 ms] calculateSha: computing sha took 727us
    [   +3 ms] ✓ Built build/app/outputs/flutter-apk/app-debug.apk.
    [   +5 ms] executing: /home/rago/Android/Sdk/build-tools/30.0.3/aapt dump xmltree /home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
    [  +10 ms] Exit code 0 from: /home/rago/Android/Sdk/build-tools/30.0.3/aapt dump xmltree /home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
    [        ] N: android=http://schemas.android.com/apk/res/android
                 E: manifest (line=2)
                   A: android:versionCode(0x0101021b)=(type 0x10)0x1
                   A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
                   A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
                   A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
                   A: package="com.example.adapp" (Raw: "com.example.adapp")
                   A: platformBuildVersionCode=(type 0x10)0x1e
                   A: platformBuildVersionName=(type 0x10)0xb
                   E: uses-sdk (line=7)
                     A: android:minSdkVersion(0x0101020c)=(type 0x10)0x14
                     A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
                   E: uses-permission (line=14)
                     A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
                   E: uses-permission (line=15)
                     A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
                   E: queries (line=16)
                     E: intent (line=19)
                       E: action (line=20)
                         A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                       E: category (line=22)
                         A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                       E: data (line=24)
                         A: android:scheme(0x01010027)="https" (Raw: "https")
                     E: intent (line=28)
                       E: action (line=29)
                         A: android:name(0x01010003)="android.support.customtabs.action.CustomTabsService" (Raw: "android.support.customtabs.action.CustomTabsService")
                   E: uses-permission (line=34)
                     A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
                   E: uses-permission (line=35)
                     A: android:name(0x01010003)="android.permission.RECEIVE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
                   E: application (line=37)
                     A: android:label(0x01010001)="adapp" (Raw: "adapp")
                     A: android:icon(0x01010002)[email protected]
                     A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                     A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                     E: activity (line=42)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.example.adapp.MainActivity" (Raw: "com.example.adapp.MainActivity")
                       A: android:launchMode(0x0101001d)=(type 0x10)0x1
                       A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                       A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                       A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                       E: meta-data (line=56)
                         A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                         A: android:resource(0x01010025)[email protected]
                       E: meta-data (line=66)
                         A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                         A: android:resource(0x01010025)[email protected]
                       E: intent-filter (line=70)
                         E: action (line=71)
                           A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                         E: category (line=73)
                           A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                     E: meta-data (line=80)
                       A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                       A: android:value(0x01010024)=(type 0x10)0x2
                     E: meta-data (line=83)
                       A: android:name(0x01010003)="com.google.android.gms.ads.APPLICATION_ID" (Raw: "com.google.android.gms.ads.APPLICATION_ID")
                       A: android:value(0x01010024)="ca-app-pub-3940256099942544~3347511713" (Raw: "ca-app-pub-3940256099942544~3347511713")
                     E: meta-data (line=86)
                       A: android:name(0x01010003)="io.flutter.embedded_views_preview" (Raw: "io.flutter.embedded_views_preview")
                       A: android:value(0x01010024)=(type 0x12)0xffffffff
                     E: activity (line=89)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdActivity" (Raw: "com.google.android.gms.ads.AdActivity")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:configChanges(0x0101001f)=(type 0x11)0xfb0
                     E: provider (line=95)
                       A: android:name(0x01010003)="com.google.android.gms.ads.MobileAdsInitProvider" (Raw: "com.google.android.gms.ads.MobileAdsInitProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.example.adapp.mobileadsinitprovider" (Raw: "com.example.adapp.mobileadsinitprovider")
                       A: android:initOrder(0x0101001a)=(type 0x10)0x64
                     E: service (line=101)
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdService" (Raw: "com.google.android.gms.ads.AdService")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                     E: meta-data (line=106)
                       A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                       A: android:value(0x01010024)[email protected]
                     E: provider (line=110)
                       A: android:name(0x01010003)="androidx.work.impl.WorkManagerInitializer" (Raw: "androidx.work.impl.WorkManagerInitializer")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:multiprocess(0x01010013)=(type 0x12)0xffffffff
                       A: android:authorities(0x01010018)="com.example.adapp.workmanager-init" (Raw: "com.example.adapp.workmanager-init")
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=117)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.SystemAlarmService" (Raw: "androidx.work.impl.background.systemalarm.SystemAlarmService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=122)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemjob.SystemJobService" (Raw: "androidx.work.impl.background.systemjob.SystemJobService")
                       A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=129)
                       A: android:name(0x01010003)="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver" (Raw: "androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=134)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=139)
                         E: action (line=140)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_CONNECTED" (Raw: "android.intent.action.ACTION_POWER_CONNECTED")
                         E: action (line=141)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_DISCONNECTED" (Raw: "android.intent.action.ACTION_POWER_DISCONNECTED")
                     E: receiver (line=144)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=149)
                         E: action (line=150)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_OKAY" (Raw: "android.intent.action.BATTERY_OKAY")
                         E: action (line=151)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_LOW" (Raw: "android.intent.action.BATTERY_LOW")
                     E: receiver (line=154)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=159)
                         E: action (line=160)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_LOW" (Raw: "android.intent.action.DEVICE_STORAGE_LOW")
                         E: action (line=161)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_OK" (Raw: "android.intent.action.DEVICE_STORAGE_OK")
                     E: receiver (line=164)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=169)
                         E: action (line=170)
                           A: android:name(0x01010003)="android.net.conn.CONNECTIVITY_CHANGE" (Raw: "android.net.conn.CONNECTIVITY_CHANGE")
                     E: receiver (line=173)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.RescheduleReceiver" (Raw: "androidx.work.impl.background.systemalarm.RescheduleReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=178)
                         E: action (line=179)
                           A: android:name(0x01010003)="android.intent.action.BOOT_COMPLETED" (Raw: "android.intent.action.BOOT_COMPLETED")
                         E: action (line=180)
                           A: android:name(0x01010003)="android.intent.action.TIME_SET" (Raw: "android.intent.action.TIME_SET")
                         E: action (line=181)
                           A: android:name(0x01010003)="android.intent.action.TIMEZONE_CHANGED" (Raw: "android.intent.action.TIMEZONE_CHANGED")
                     E: receiver (line=184)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=189)
                         E: action (line=190)
                           A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.UpdateProxies" (Raw: "androidx.work.impl.background.systemalarm.UpdateProxies")
                     E: service (line=194)
                       A: android:name(0x01010003)="androidx.room.MultiInstanceInvalidationService" (Raw: "androidx.room.MultiInstanceInvalidationService")
                       A: android:exported(0x01010010)=(type 0x12)0x0
    [   +3 ms] Stopping app 'app.apk' on AOSP on IA Emulator.
    [        ] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.example.adapp
    [ +257 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell pm list packages com.example.adapp
    [  +88 ms] package:com.example.adapp
    [   +1 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell cat /data/local/tmp/sky.com.example.adapp.sha1
    [  +29 ms] d0fb460193bb760e8ddc7fa3544ad648e602ed0d
    [   +1 ms] Installing APK.
    [   +1 ms] Installing build/app/outputs/flutter-apk/app.apk...
    [        ] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 install -t -r /home/rago/Videos/Flutta/adapp/build/app/outputs/flutter-apk/app.apk
    [+2467 ms] Performing Streamed Install
                        Success
    [   +1 ms] Installing build/app/outputs/flutter-apk/app.apk... (completed in 2,467ms)
    [   +1 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell echo -n 453ede5b513d8ee89996d555b7864af286180973 > /data/local/tmp/sky.com.example.adapp.sha1
    [  +61 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
    [  +67 ms] --------- beginning of main
               05-05 18:31:07.549 I/CarrierServices( 3450): [2] RcsAutoStartReceiver.b: RcsAutoStartReceiver triggered. Fetching RCS State. Action: android.intent.action.PACKAGE_ADDED
    [  +10 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true
    com.example.adapp/com.example.adapp.MainActivity
    [ +264 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.adapp/.MainActivity (has extras) }
    [        ] Waiting for observatory port to be available...
    [+2568 ms] Observatory URL on device: http://127.0.0.1:33428/h_vZKv6vAc0=/
    [   +1 ms] executing: /home/rago/Android/Sdk/platform-tools/adb -s emulator-5554 forward tcp:0 tcp:33428
    [   +9 ms] 43679
    [        ] Forwarded host port 43679 to device port 33428 for Observatory
    [  +11 ms] Caching compiled dill
    [ +126 ms] Connecting to service protocol: http://127.0.0.1:43679/h_vZKv6vAc0=/
    [ +599 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:43679/h_vZKv6vAc0=/.
    [ +367 ms] DDS is listening at http://127.0.0.1:39651/mJ1361d9r-0=/.
    [ +111 ms] Successfully connected to service protocol: http://127.0.0.1:43679/h_vZKv6vAc0=/
    [+1185 ms] DevFS: Creating new filesystem on the device (null)
    [ +357 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.adapp/code_cache/adappFIGLEH/adapp/)
    [  +15 ms] Updating assets
    [ +140 ms] Syncing files to device AOSP on IA Emulator...
    [   +1 ms] <- reset
    [        ] Compiling dart to kernel with 0 updated files
    [   +2 ms] <- recompile package:adapp/main.dart ad73c4b7-f345-40ef-9001-c397026ad7be
    [        ] <- ad73c4b7-f345-40ef-9001-c397026ad7be
    [ +109 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f30a0)
    [        ] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 0 (0) 1 0
    [  +23 ms] I/m.example.adap(15097): The ClassLoaderContext is a special shared library.
    [  +92 ms] Updating files.
    [        ] DevFS: Sync finished
    [        ] Syncing files to device AOSP on IA Emulator... (completed in 232ms)
    [   +1 ms] Synced 0.0MB.
    [   +1 ms] <- accept
    [  +27 ms] Connected to _flutterView/0xe3e2ec10.
    [   +3 ms] Flutter run key commands.
    [   +2 ms] r Hot reload. 🔥🔥🔥
    [   +1 ms] R Hot restart.
    [        ] h Repeat this help message.
    [        ] d Detach (terminate "flutter run" but leave application running).
    [   +1 ms] c Clear the screen
    [   +1 ms] q Quit (terminate the application on the device).
    [   +1 ms] An Observatory debugger and profiler on AOSP on IA Emulator is available at: http://127.0.0.1:39651/mJ1361d9r-0=/
    [   +2 ms] 
               Flutter DevTools, a Flutter debugger and profiler, on AOSP on IA Emulator is available at: http://127.0.0.1:9101?uri=http%3A%2F%2F127.0.0.1%3A39651%2FmJ1361d9r-0%3D%2F
    [        ] 💪 Running with sound null safety 💪
    [  +11 ms] I/chatty  (15097): uid=10087(com.example.adapp) identical 1 line
    [        ] I/m.example.adap(15097): The ClassLoaderContext is a special shared library.
    [        ] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [   +4 ms] D/DynamitePackage(15097): Instantiated singleton DynamitePackage.
    [        ] D/DynamitePackage(15097): Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
    [ +139 ms] I/WebViewFactory(15097): Loading com.android.chrome version 69.0.3497.100 (code 349710017)
    [  +23 ms] I/m.example.adap(15097): The ClassLoaderContext is a special shared library.
    [ +164 ms] I/cr_LibraryLoader(15097): Time to load native libraries: 6 ms (timestamps 867-873)
    [  +14 ms] E/cr_VariationsUtils(15097): Failed reading seed file "/data/user/0/com.example.adapp/app_webview/variations_seed": /data/user/0/com.example.adapp/app_webview/variations_seed (No such file or directory)
    [  +26 ms] I/chromium(15097): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
    [   +1 ms] I/cr_LibraryLoader(15097): Expected native library version number "69.0.3497.100", actual native library version number "69.0.3497.100"
    [   +9 ms] W/cr_ChildProcLH(15097): Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
    [  +10 ms] I/cr_BrowserStartup(15097): Initializing chromium process, singleProcess=false
    [ +217 ms] W/m.example.adap(15097): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method
    Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method
    Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [   +1 ms] W/m.example.adap(15097): Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [        ] W/m.example.adap(15097): Accessing hidden method
    Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
    [  +62 ms] W/cr_media(15097): Requires BLUETOOTH permission
    [  +36 ms] D/HostConnection(15097): HostConnection::get() New Host Connection established 0xd071e740, tid 15210
    [  +23 ms] D/HostConnection(15097): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer
    GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 
    [  +32 ms] W/cr_CrashFileManager(15097): /data/user/0/com.example.adapp/cache/WebView/Crash Reports does not exist or is not a directory
    [  +21 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 0 (0) 0 0
    [        ] D/EGL_emulation(15097): eglCreateContext: 0xe3e105c0: maj 3 min 0 rcv 3
    [        ] D/EGL_emulation(15097): eglMakeCurrent: 0xe3e105c0: ver 3 0 (tinfo 0xcb460300)
    [  +71 ms] W/VideoCapabilities(15097): Unrecognized profile 4 for video/hevc
    [  +44 ms] I/VideoCapabilities(15097): Unsupported profile 4 for video/mp4v-es
    [   +9 ms] D/DynamitePackage(15097): Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
    [        ] W/cr_MediaCodecUtil(15097): HW encoder for video/avc is not available on this device.
    [  +17 ms] I/Ads     (15097): This request is sent from a test device.
    [  +24 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 0 (0) 0 0
    [        ] D/EGL_emulation(15097): eglCreateContext: 0xe3e0fd80: maj 3 min 0 rcv 3
    [        ] D/EGL_emulation(15097): eglMakeCurrent: 0xe3e0fd80: ver 3 0 (tinfo 0xcb460300)
    [        ] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [  +30 ms] W/m.example.adap(15097): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
    [  +15 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 1 (1) 0 0
    [  +17 ms] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [   +2 ms] W/Parcel  (15097): **** enforceInterface() expected 'com.google.android.gms.ads.clearcut.IClearcut' but read 'com.google.android.gms.gass.internal.clearcut.IClearcut'
    [  +23 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 2 (2) 0 0
    [        ] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [   +1 ms] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [  +22 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 1 (1) 0 0
    [  +58 ms] I/m.example.adap(15097): The ClassLoaderContext is a special shared library.
    [        ] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [ +127 ms] I/m.example.adap(15097): Background concurrent copying GC freed 14513(1583KB) AllocSpace objects, 1(20KB) LOS objects, 49% free, 3MB/7MB, paused 14.234ms total 193.791ms
    [  +17 ms] I/DynamiteModule(15097): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:210890500
    [        ] I/DynamiteModule(15097): Selected remote version of com.google.android.gms.ads.dynamite, version >= 210890500
    [   +6 ms] W/Parcel  (15097): **** enforceInterface() expected 'com.google.android.gms.ads.clearcut.IClearcut' but read 'com.google.android.gms.gass.internal.clearcut.IClearcut'
    [   +5 ms] D/eglCodecCommon(15097): setVertexArrayObject: set vao to 2 (2) 0 0
    [ +333 ms] W/Ads     (15097): Not retrying to fetch app settings
    [ +664 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    [        ] W/m.example.adap(15097): Accessing hidden method Landroid/media/ImageReader;->newInstance(IIIIJ)Landroid/media/ImageReader; (dark greylist, linking)
    [  +13 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    [  +54 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    [  +15 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    [ +115 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    [  +33 ms] D/EGL_emulation(15097): eglMakeCurrent: 0xeba43700: ver 3 0 (tinfo 0xe78f3070)
    
    ➜  adapp git:(master) ✗ flutter analyze      
    Analyzing adapp...                                                      
    No issues found! (ran in 2.3s)
    
    ➜  adapp git:(master) ✗ flutter doctor -v  
    [✓] Flutter (Channel stable, 2.0.5, on Linux, locale en_GB.UTF-8)
        • Flutter version 2.0.5 at /home/rago/snap/flutter/common/flutter
        • Framework revision adc687823a (3 weeks ago), 2021-04-16 09:40:20 -0700
        • Engine revision b09f014e96
        • Dart version 2.12.3
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /home/rago/Android/Sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: /snap/android-studio/current/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop
        • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
        • cmake version 3.10.2
        • ninja version 1.8.2
        • pkg-config version 0.29.1
    
    [✓] Android Studio
        • Android Studio at /snap/android-studio/current/android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • android-studio-dir = /snap/android-studio/current/android-studio
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.55.2)
        • VS Code at /usr/share/code
        • Flutter extension can be installed from:
          🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [✓] Connected device (3 available)
        • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
        • Linux (desktop)              • linux         • linux-x64      • Linux
        • Chrome (web)                 • chrome        • web-javascript • Google Chrome 90.0.4430.93
    
    • No issues found!
    
    duplicate 
    opened by ragokan 21
  • Android ONLY: java.lang.IllegalStateException: PlatformView#getView() returned null, but an Android view reference was expected

    Android ONLY: java.lang.IllegalStateException: PlatformView#getView() returned null, but an Android view reference was expected

    Bug report

    Describe the bug Inline banner ad in a list cause crash on Android only.

    Steps to reproduce

    Steps to reproduce the behavior:

    1. Update dependency to 0.11.0+2 for google_mobile_ads & minSdk to 19 in (https://github.com/googlecodelabs/admob-inline-ads-in-flutter)
    2. Increase sample items x 3 which use for inline banner ad example
    3. Scroll down until ad goes out of viewport, scroll up again and had this crash below on Android ONLY:
    E/flutter (12339): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.IllegalStateException: PlatformView#getView() returned null, but an Android view reference was expected.
    E/flutter (12339): 	at io.flutter.plugin.platform.PlatformViewsController.initializePlatformViewIfNeeded(PlatformViewsController.java:710)
    E/flutter (12339): 	at io.flutter.plugin.platform.PlatformViewsController.onDisplayPlatformView(PlatformViewsController.java:739)
    E/flutter (12339): 	at io.flutter.embedding.engine.FlutterJNI.onDisplayPlatformView(FlutterJNI.java:957)
    E/flutter (12339): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter (12339): 	at android.os.MessageQueue.next(MessageQueue.java:335)
    E/flutter (12339): 	at android.os.Looper.loop(Looper.java:206)
    E/flutter (12339): 	at android.app.ActivityThread.main(ActivityThread.java:8419)
    E/flutter (12339): 	at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (12339): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
    E/flutter (12339): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    E/flutter (12339): 
    F/flutter (12339): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1196)] Check failed: CheckException(env). 
    F/libc    (12339): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 12339 (.admobinlineads), pid 12339 (.admobinlineads)
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'samsung/x1sxx/x1s:11/RP1A.200720.012/G980FXXU5CUA3:user/release-keys'
    Revision: '22'
    ABI: 'arm64'
    Timestamp: 2021-03-06 16:01:56+0300
    pid: 12339, tid: 12339, name: .admobinlineads  >>> com.codelab.flutter.admobinlineads <<<
    uid: 10371
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1196)] Check failed: CheckException(env). 
    '
        x0  0000000000000000  x1  0000000000003033  x2  0000000000000006  x3  0000007fecb68210
        x4  0000007e1e62f000  x5  0000007e1e62f000  x6  0000007e1e62f000  x7  0000000003736aa0
        x8  00000000000000f0  x9  344ba72bcf5be43a  x10 0000000000000000  x11 ffffffc0fffffbdf
        x12 0000000000000001  x13 0000000000000074  x14 0000000000000000  x15 00006f5640eaf8be
        x16 0000007e174bac80  x17 0000007e1749cc50  x18 0000007e1e61e000  x19 0000000000003033
        x20 0000000000003033  x21 00000000ffffffff  x22 0000007be6bae010  x23 0000000000000000
        x24 0000000000000438  x25 00000000000000d8  x26 0000000000000001  x27 0000007fecb68510
        x28 0000000000000085  x29 0000007fecb68290
        lr  0000007e17450624  sp  0000007fecb681f0  pc  0000007e17450650  pst 0000000000000000
    backtrace:
          #00 pc 000000000004e650  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: b6a050117a93689b5308931507900b87)
          #01 pc 0000000001288244  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #02 pc 00000000012792f4  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #03 pc 00000000012cb534  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #04 pc 00000000012be28c  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #05 pc 00000000012beb60  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #06 pc 00000000012bf4e0  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #07 pc 00000000012be5c4  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #08 pc 00000000012be398  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #09 pc 00000000012bf718  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #10 pc 0000000001288bbc  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #11 pc 000000000128dc7c  /data/app/~~E_A6gdfKtuyBjx_ve83yBg==/com.codelab.flutter.admobinlineads-n5uEz5IUmmkCJXhBAs3vHw==/lib/arm64/libflutter.so (BuildId: 9c542952e0ea7b7a4b9c9734eda4f117db4285aa)
          #12 pc 0000000000019da8  /system/lib64/libutils.so (android::Looper::pollInner(int)+916) (BuildId: 4e69b93bf70ed592f0029dbd1097529e)
          #13 pc 00000000000199ac  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 4e69b93bf70ed592f0029dbd1097529e)
          #14 pc 00000000001187f4  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: 242a1c2f8c01c3530aee42ce4254ec53)
          #15 pc 000000000024f00c  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+140) (BuildId: ba616edc5d43a5ad71e513e266d2e93e004cfa2e)
          #16 pc 00000000020019bc  /memfd:jit-cache (deleted) (offset 0x2000000) (android.os.MessageQueue.next+204)
          #17 pc 0000000000134564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #18 pc 00000000001a9a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #19 pc 0000000000320d60  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #20 pc 000000000031708c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #21 pc 0000000000684870  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #22 pc 000000000012e814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #23 pc 000000000044caf2  /system/framework/framework.jar (offset 0x9cb000) (android.os.Looper.loop+154)
          #24 pc 000000000030e688  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.8133272982542804073)+268) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #25 pc 0000000000316678  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #26 pc 0000000000317a60  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1772) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #27 pc 0000000000178f40  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<true, false>(art::interpreter::SwitchImplContext*)+57848) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #28 pc 00000000001407d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #29 pc 00000000001cd564  /system/framework/framework.jar (android.app.ActivityThread.main)
          #30 pc 000000000030e790  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.8133272982542804073)+532) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #31 pc 00000000006732f4  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #32 pc 000000000013dff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #33 pc 00000000001347e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #34 pc 00000000001a9a94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #35 pc 000000000055d2a0  /apex/com.android.art/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1364) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #36 pc 00000000004dc60c  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #37 pc 000000000008a6f4  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+180) (BuildId: cf3195be2d1e729ad27299071d73c22f0d849b44)
          #38 pc 0000000000134564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #39 pc 00000000001a9a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #40 pc 0000000000320d60  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #41 pc 000000000031708c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #42 pc 0000000000684870  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #43 pc 000000000012e814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #44 pc 0000000000236df6  /system/framework/framework.jar (offset 0x1c0c000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
          #45 pc 000000000030e688  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.8133272982542804073)+268) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #46 pc 00000000006732f4  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #47 pc 000000000013dff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #48 pc 0000000000afbfac  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2444) (BuildId: ba616edc5d43a5ad71e513e266d2e93e004cfa2e)
          #49 pc 00000000001347e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #50 pc 00000000001a9a94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #51 pc 000000000055bcdc  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #52 pc 000000000055c190  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #53 pc 0000000000440b94  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+656) (BuildId: 1e59dbd15c62f521119299bf54dfe884)
          #54 pc 000000000009d424  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124) (BuildId: 242a1c2f8c01c3530aee42ce4254ec53)
          #55 pc 00000000000a5244  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+848) (BuildId: 242a1c2f8c01c3530aee42ce4254ec53)
          #56 pc 0000000000003594  /system/bin/app_process64 (main+1356) (BuildId: 1b1b967ddfe0761f978fc1b2bd9ea55a)
          #57 pc 0000000000049a38  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: b6a050117a93689b5308931507900b87)
    Lost connection to device.
    

    `

    Expected behavior

    No crash.


    Additional context

    Add any other context about the problem here.


    Flutter doctor

    Run flutter doctor and paste the output below:

    Click To Expand
    PASTE OUTPUT INSIDE HERE
    

    Flutter dependencies

    Run flutter pub deps -- --style=compact and paste the output below:

    Click To Expand
    PASTE OUTPUT INSIDE HERE
    

    opened by figengungor 20
  • AdWidget is already in the widget tree

    AdWidget is already in the widget tree

    This error occur This AdWidget is already in the Widget tree I/flutter ( 7541): If you placed this AdWidget in a list, make sure you create a new instance in the builder function I/flutter ( 7541): with a unique ad object.

    Code Looks like: ListView( children: [ AdWidget(ad: BannerAd(//Parameters)..load() as BannerAd), AdWidget(ad: BannerAd(//Parameters)..load() as BannerAd), AdWidget(ad: BannerAd(//Parameters)..load() as BannerAd), ] )

    In the first time ad loads properly but when i scroll to bottom again scroll to top error occurs

    opened by SarbudeenDeveloper 19
  • 🐛Ad for following adId already exists: 0

    🐛Ad for following adId already exists: 0

    Bug report

    Describe the bug This error appears if I set the adUnitId to literally anything. I've tried setting the property to 'hi' and a bunch of other stuff but it somehow still appears. And if I set it to a valid ad id it continues to appear and the ad never shows.

    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263): java.lang.IllegalArgumentException: Ad for following adId already exists: 0
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at io.flutter.plugins.googlemobileads.AdInstanceManager.trackAd(AdInstanceManager.java:66)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:266)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at android.os.MessageQueue.nativePollOnce(Native Method)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at android.os.MessageQueue.next(MessageQueue.java:335)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at android.os.Looper.loop(Looper.java:183)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at android.app.ActivityThread.main(ActivityThread.java:7656)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at java.lang.reflect.Method.invoke(Native Method)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    E/MethodChannel#plugins.flutter.io/google_mobile_ads( 6263):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
    E/flutter ( 6263): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(error, Ad for following adId already exists: 0, null, java.lang.IllegalArgumentException: Ad for following adId already exists: 0
    E/flutter ( 6263):      at io.flutter.plugins.googlemobileads.AdInstanceManager.trackAd(AdInstanceManager.java:66)
    E/flutter ( 6263):      at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:266)
    E/flutter ( 6263):      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
    E/flutter ( 6263):      at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
    E/flutter ( 6263):      at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
    E/flutter ( 6263):      at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter ( 6263):      at android.os.MessageQueue.next(MessageQueue.java:335)
    E/flutter ( 6263):      at android.os.Looper.loop(Looper.java:183)
    E/flutter ( 6263):      at android.app.ActivityThread.main(ActivityThread.java:7656)
    E/flutter ( 6263):      at java.lang.reflect.Method.invoke(Native Method)
    E/flutter ( 6263):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    E/flutter ( 6263):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
    E/flutter ( 6263): )
    E/flutter ( 6263): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
    E/flutter ( 6263): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
    E/flutter ( 6263): <asynchronous suspension>
    E/flutter ( 6263): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
    E/flutter ( 6263): #3      AdInstanceManager.loadNativeAd (package:google_mobile_ads/src/ad_instance_manager.dart:172:20)
    E/flutter ( 6263): #4      NativeAd.load (package:google_mobile_ads/src/ad_containers.dart:576:27)
    E/flutter ( 6263): #5      NativeAdState.initState.<anonymous closure> (package:discord_bots/widgets/global/native_ad_widget.dart:36:65)
    E/flutter ( 6263): #6      new Future.delayed.<anonymous closure> (dart:async/future.dart:326:39)
    E/flutter ( 6263): #7      _rootRun (dart:async/zone.dart:1182:47)
    E/flutter ( 6263): #8      _CustomZone.run (dart:async/zone.dart:1093:19)
    E/flutter ( 6263): #9      _CustomZone.runGuarded (dart:async/zone.dart:997:7)
    E/flutter ( 6263): #10     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
    E/flutter ( 6263): #11     _rootRun (dart:async/zone.dart:1190:13)
    E/flutter ( 6263): #12     _CustomZone.run (dart:async/zone.dart:1093:19)
    E/flutter ( 6263): #13     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1021:23)
    E/flutter ( 6263): #14     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
    E/flutter ( 6263): #15     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:397:19)
    E/flutter ( 6263): #16     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
    E/flutter ( 6263): #17     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    E/flutter ( 6263):
    

    Steps to reproduce

    Steps to reproduce the behavior:

    1. Create a native ad widget
    2. Add the java files to the src folder and add the layout XML file to the res folder.
    3. Run app

    Additional context

    My code is from the example:

    
    import 'package:flutter/material.dart';
    import 'package:google_mobile_ads/google_mobile_ads.dart';
    
    class NativeAdWidget extends StatefulWidget {
      @override
      State<StatefulWidget> createState() => NativeAdState();
    }
    
    class NativeAdState extends State<NativeAdWidget> {
      NativeAd _nativeAd;
      final Completer<NativeAd> nativeAdCompleter = Completer<NativeAd>();
    
      @override
      void initState() {
        super.initState();
        _nativeAd = NativeAd(
          adUnitId: NativeAd.testAdUnitId,
          request: AdRequest(),
          factoryId: 'listTile',
          listener: AdListener(
            onAdLoaded: (Ad ad) {
              print('$NativeAd loaded.');
              nativeAdCompleter.complete(ad as NativeAd);
            },
            onAdFailedToLoad: (Ad ad, LoadAdError error) {
              print('$NativeAd failedToLoad: $error');
              nativeAdCompleter.completeError(null);
            },
            onAdOpened: (Ad ad) => print('$NativeAd onAdOpened.'),
            onAdClosed: (Ad ad) => print('$NativeAd onAdClosed.'),
            onApplicationExit: (Ad ad) => print('$NativeAd onApplicationExit.'),
          ),
        );
        Future<void>.delayed(Duration(seconds: 1), () => _nativeAd?.load());
      }
    
      @override
      void dispose() {
        super.dispose();
        _nativeAd?.dispose();
        _nativeAd = null;
      }
    
      @override
      Widget build(BuildContext context) {
        return FutureBuilder<NativeAd>(
          future: nativeAdCompleter.future,
          builder: (BuildContext context, AsyncSnapshot<NativeAd> snapshot) {
            Widget child;
    
            switch (snapshot.connectionState) {
              case ConnectionState.none:
              case ConnectionState.waiting:
              case ConnectionState.active:
                child = Container();
                break;
              case ConnectionState.done:
                if (snapshot.hasData) {
                  child = AdWidget(ad: _nativeAd);
                } else {
                  child = Text('Error loading $NativeAd');
                }
            }
    
            return Container(
              width: 250,
              height: 350,
              child: child,
              color: Colors.blueGrey,
            );
          },
        );
      }
    }
    

    opened by Tetracyl 18
  • Issue: Screen flickering when navigating to a new screen

    Issue: Screen flickering when navigating to a new screen

    Screen is flickering when navigating to a new screen within drawer. This happens after updating to the latest Flutter version (2.8.1). Before the update, everything worked well (in Flutter version 2.5.3). If I remove banner ad navigation works well. I've noticed that this problem has affected many developers.

    opened by aquiroga96 0
  • Add support for Rewarded Interstitial format

    Add support for Rewarded Interstitial format

    Description

    Adds support for the Rewarded Interstitial format.

    Related Issues

    *Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.

    Checklist

    Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

    • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
    • [x] All existing and new tests are passing.
    • [x] I updated/added relevant documentation (doc comments with ///).
    • [x] The analyzer (flutter analyze) does not report any problems on my PR.
    • [x] I read and followed the Flutter Style Guide.
    • [x] I signed the CLA.
    • [x] I am willing to follow-up on review comments in a timely manner.

    Breaking Change

    Does your PR require plugin users to manually update their apps to accommodate your change?

    • [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
    • [x] No, this is not a breaking change.
    opened by srichakradhar 0
  • Prefer mavenCentral for Android builds.

    Prefer mavenCentral for Android builds.

    Description

    Prefer mavenCentral for Android builds over jcenter.

    https://blog.gradle.org/jcenter-shutdown jcenter is shutting down and this can cause Android build failures in some regions atm, and globally in the future.

    Related Issues

    *Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.

    Checklist

    Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

    • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
    • [ ] All existing and new tests are passing.
    • [ ] I updated/added relevant documentation (doc comments with ///).
    • [x] The analyzer (flutter analyze) does not report any problems on my PR.
    • [x] I read and followed the Flutter Style Guide.
    • [x] I signed the CLA.
    • [x] I am willing to follow-up on review comments in a timely manner.

    Breaking Change

    Does your PR require plugin users to manually update their apps to accommodate your change?

    • [ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
    • [ ] No, this is not a breaking change.
    opened by asmengistu 1
  • Layout Issues when Using Multiple Native Ads on the Same Screen

    Layout Issues when Using Multiple Native Ads on the Same Screen

    Plugin Version

    google_mobile_ads: ^1.0.1

    Steps to Reproduce

    1. Clone repository from https://codelabs.developers.google.com/codelabs/admob-inline-ads-in-flutter#1
    2. (optional) Update plugin to recent version, update compileSdkVersion and targetSdkVersion
    3. Edit native_inline_page.dart to add another native ad (_ad2) and wrap the page in a WillPopScope which calls a dialog containing a native ad wrapped in a sized box (I did not change anything else besides this):
    code sample
    // Copyright 2021 Google LLC
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    // COMPLETE: Import ad_helper.dart
    import 'dart:math';
    
    import 'package:admob_inline_ads_in_flutter/ad_helper.dart';
    import 'package:admob_inline_ads_in_flutter/destination.dart';
    import 'package:flutter/material.dart';
    
    // COMPLETE: Import google_mobile_ads.dart
    import 'package:google_mobile_ads/google_mobile_ads.dart';
    
    class NativeInlinePage extends StatefulWidget {
      final List<Destination> entries;
    
      NativeInlinePage({
        required this.entries,
      });
    
      @override
      State createState() => _NativeInlinePageState();
    }
    
    class _NativeInlinePageState extends State<NativeInlinePage> {
      // COMPLETE: Add _kAdIndex
      static final _kAdIndex = 4;
    
      // COMPLETE: Add NativeAd instance
      late NativeAd _ad;
      late NativeAd _ad2;
    
      // COMPLETE: Add _isAdLoaded
      bool _isAdLoaded = false;
      bool _isAdLoaded2 = false;
    
      @override
      void initState() {
        super.initState();
    
        // COMPLETE: Create a NativeAd instance
        _ad = NativeAd(
          adUnitId: AdManager.nativeAdUnitId,
          factoryId: 'listTile',
          request: AdRequest(),
          listener: NativeAdListener(
            onAdLoaded: (_) {
              setState(() {
                _isAdLoaded = true;
              });
            },
            onAdFailedToLoad: (ad, error) {
              // Releases an ad resource when it fails to load
              ad.dispose();
    
              print('Ad load failed (code=${error.code} message=${error.message})');
            },
          ),
        );
    
        // COMPLETE: Load an ad
        _ad.load();
    
        _ad2 = NativeAd(
          adUnitId: AdManager.nativeAdUnitId,
          factoryId: 'listTile',
          request: AdRequest(),
          listener: NativeAdListener(
            onAdLoaded: (_) {
              setState(() {
                _isAdLoaded2 = true;
              });
            },
            onAdFailedToLoad: (ad2, error) {
              // Releases an ad resource when it fails to load
              ad2.dispose();
    
              print('Ad load failed (code=${error.code} message=${error.message})');
            },
          ),
        );
    
        // COMPLETE: Load an ad
        _ad2.load();
      }
    
      @override
      Widget build(BuildContext context) {
        return WillPopScope(
          onWillPop: () async {
            await showDialog<bool>(
              context: context,
              barrierDismissible: false,
              builder: (BuildContext context) {
                return AlertDialog(
                  content: SizedBox(
                    height: 240.0,
                    child: _isAdLoaded2 ? AdWidget(ad: _ad2) : Container(),
                  ),
                  actions: [
                    ElevatedButton(
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                      child: Text('ok'),
                    ),
                  ],
                );
              },
            );
            return true;
          },
          child: Scaffold(
            appBar: AppBar(
              title: Text('AdMob Native Inline Ad'),
            ),
            body: ListView.builder(
              // COMPLETE: Adjust itemCount based on the ad load state
              itemCount: widget.entries.length + (_isAdLoaded ? 1 : 0),
              itemBuilder: (context, index) {
                // COMPLETE: Render a native ad
                if (_isAdLoaded && index == _kAdIndex) {
                  return Container(
                    child: AdWidget(ad: _ad),
                    height: 72.0,
                    alignment: Alignment.center,
                  );
                } else {
                  // COMPLETE: Get adjusted item index from _getDestinationItemIndex()
                  final item = widget.entries[_getDestinationItemIndex(index)];
    
                  return ListTile(
                    leading: Image.asset(
                      item.asset,
                      width: 48,
                      height: 48,
                      package: 'flutter_gallery_assets',
                      fit: BoxFit.cover,
                    ),
                    title: Text(item.name),
                    subtitle: Text(item.duration),
                    onTap: () {
                      print('Clicked ${item.name}');
                    },
                  );
                }
              },
            ),
          ),
        );
      }
    
      @override
      void dispose() {
        // COMPLETE: Dispose a NativeAd object
        _ad.dispose();
        super.dispose();
      }
    
      // COMPLETE: Add _getDestinationItemIndex()
      int _getDestinationItemIndex(int rawIndex) {
        if (rawIndex >= _kAdIndex && _isAdLoaded) {
          return rawIndex - 1;
        }
        return rawIndex;
      }
    }
    

    Expected results:

    When pressing the back button a dialog should open including a second ad and an ok button.

    Actual results:

    Ok button is missing:

    If I remove the ad from the underlying ListView, everything is working fine:

    I experience similar problems when using a native ad and a flutter map (https://pub.dev/packages/flutter_map) together on the same screen. Everything works fine using https://pub.dev/packages/native_admob_flutter.

    Please tell me if you need addditional information. Thanks for your help!

    Logs
    [  +59 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [ +262 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [   +1 ms] 77d935af4db863f6abd0b9c31c7e6df2a13de57b
    [        ] executing: [C:\flutter/] git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
    [ +162 ms] Exit code 0 from: git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
    [        ] 2.8.1
    [   +7 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [  +28 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [        ] origin/stable
    [        ] executing: [C:\flutter/] git ls-remote --get-url origin
    [  +23 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] https://github.com/flutter/flutter.git
    [  +94 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
    [  +26 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [   +1 ms] stable
    [  +66 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +47 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
    [  +38 ms] List of devices attached
               emulator-5554          device product:sdk_gphone_x86 model:sdk_gphone_x86 device:generic_x86_arm transport_id:2
    [   +7 ms] C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
    [  +40 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +75 ms] Skipping pub get: version match.
    [  +16 ms] Found plugin google_mobile_ads at C:\Users\leif0\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_mobile_ads-1.0.1\
    [  +88 ms] Found plugin google_mobile_ads at C:\Users\leif0\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_mobile_ads-1.0.1\
    [  +22 ms] Generating C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
    [  +46 ms] ro.hardware = ranchu
    [  +13 ms] Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
    [  +22 ms] Initializing file store
    [  +11 ms] Skipping target: gen_localizations
    [   +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
    C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\.dart_tool\package_config_subset}
    [  +13 ms] Found plugin google_mobile_ads at C:\Users\leif0\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_mobile_ads-1.0.1\
    [  +13 ms] gen_dart_plugin_registrant: Complete
    [   +1 ms] Skipping target: _composite
    [   +3 ms] complete
    [   +5 ms] Launching lib\main.dart on sdk gphone x86 in debug mode...
    [   +4 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/
    --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\leif0\AppData\Local\Temp\flutter_tools.3b5b2d86\flutter_tool.edb12e2d\app.dill
    --packages C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
    --initialize-from-dill build\c075001b96339384a97db4862b8ab8db.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy
    [   +9 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\build-tools\31.0.0-rc2\aapt dump xmltree C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [  +12 ms] Exit code 0 from: C:\Users\leif0\AppData\Local\Android\sdk\build-tools\31.0.0-rc2\aapt dump xmltree C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [        ] N: android=http://schemas.android.com/apk/res/android
                 E: manifest (line=2)
                   A: android:versionCode(0x0101021b)=(type 0x10)0x1
                   A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
                   A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
                   A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12")
                   A: package="com.codelab.flutter.admobinlineads" (Raw: "com.codelab.flutter.admobinlineads")
                   A: platformBuildVersionCode=(type 0x10)0x1f
                   A: platformBuildVersionName=(type 0x10)0xc
                   E: uses-sdk (line=7)
                     A: android:minSdkVersion(0x0101020c)=(type 0x10)0x13
                     A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
                   E: uses-permission (line=14)
                     A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
                   E: uses-permission (line=15)
                     A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
                   E: uses-permission (line=16)
                     A: android:name(0x01010003)="com.google.android.gms.permission.AD_ID" (Raw: "com.google.android.gms.permission.AD_ID")
                   E: queries (line=17)
                     E: intent (line=20)
                       E: action (line=21)
                         A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                       E: category (line=23)
                         A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                       E: data (line=25)
                         A: android:scheme(0x01010027)="https" (Raw: "https")
                     E: intent (line=29)
                       E: action (line=30)
                         A: android:name(0x01010003)="android.support.customtabs.action.CustomTabsService" (Raw: "android.support.customtabs.action.CustomTabsService")
                   E: uses-permission (line=35)
                     A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
                   E: uses-permission (line=36)
                     A: android:name(0x01010003)="android.permission.RECEIVE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
                   E: uses-permission (line=37)
                     A: android:name(0x01010003)="android.permission.FOREGROUND_SERVICE" (Raw: "android.permission.FOREGROUND_SERVICE")
                   E: application (line=39)
                     A: android:label(0x01010001)="AdMob Inline Ads" (Raw: "AdMob Inline Ads")
                     A: android:icon(0x01010002)[email protected]
                     A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                     A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                     E: activity (line=44)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.codelab.flutter.admobinlineads.MainActivity" (Raw: "com.codelab.flutter.admobinlineads.MainActivity")
                       A: android:launchMode(0x0101001d)=(type 0x10)0x1
                       A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                       A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                       A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                       E: meta-data (line=58)
                         A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                         A: android:resource(0x01010025)[email protected]
                       E: meta-data (line=68)
                         A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                         A: android:resource(0x01010025)[email protected]
                       E: intent-filter (line=72)
                         E: action (line=73)
                           A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                         E: category (line=75)
                           A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                     E: meta-data (line=82)
                       A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                       A: android:value(0x01010024)=(type 0x10)0x2
                     E: meta-data (line=87)
                       A: android:name(0x01010003)="com.google.android.gms.ads.APPLICATION_ID" (Raw: "com.google.android.gms.ads.APPLICATION_ID")
                       A: android:value(0x01010024)="ca-app-pub-3940256099942544~3220297310" (Raw: "ca-app-pub-3940256099942544~3220297310")
                     E: meta-data (line=90)
                       A: android:name(0x01010003)="io.flutter.embedded_views_preview" (Raw: "io.flutter.embedded_views_preview")
                       A: android:value(0x01010024)=(type 0x12)0xffffffff
                     E: provider (line=94)
                       A: android:name(0x01010003)="androidx.lifecycle.ProcessLifecycleOwnerInitializer" (Raw: "androidx.lifecycle.ProcessLifecycleOwnerInitializer")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:multiprocess(0x01010013)=(type 0x12)0xffffffff
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.lifecycle-process" (Raw: "com.codelab.flutter.admobinlineads.lifecycle-process")
                     E: activity (line=99)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdActivity" (Raw: "com.google.android.gms.ads.AdActivity")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:configChanges(0x0101001f)=(type 0x11)0xfb0
                     E: provider (line=105)
                       A: android:name(0x01010003)="com.google.android.gms.ads.MobileAdsInitProvider" (Raw: "com.google.android.gms.ads.MobileAdsInitProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.mobileadsinitprovider" (Raw: "com.codelab.flutter.admobinlineads.mobileadsinitprovider")
                       A: android:initOrder(0x0101001a)=(type 0x10)0x64
                     E: service (line=111)
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdService" (Raw: "com.google.android.gms.ads.AdService")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                     E: provider (line=116)
                       A: android:name(0x01010003)="androidx.startup.InitializationProvider" (Raw: "androidx.startup.InitializationProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.androidx-startup" (Raw: "com.codelab.flutter.admobinlineads.androidx-startup")
                       E: meta-data (line=120)
                         A: android:name(0x01010003)="androidx.work.WorkManagerInitializer" (Raw: "androidx.work.WorkManagerInitializer")
                         A: android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
                     E: service (line=125)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.SystemAlarmService" (Raw: "androidx.work.impl.background.systemalarm.SystemAlarmService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=130)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemjob.SystemJobService" (Raw: "androidx.work.impl.background.systemjob.SystemJobService")
                       A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=136)
                       A: android:name(0x01010003)="androidx.work.impl.foreground.SystemForegroundService" (Raw: "androidx.work.impl.foreground.SystemForegroundService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=142)
                       A: android:name(0x01010003)="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver" (Raw: "androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=147)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=152)
                         E: action (line=153)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_CONNECTED" (Raw: "android.intent.action.ACTION_POWER_CONNECTED")
                         E: action (line=154)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_DISCONNECTED" (Raw: "android.intent.action.ACTION_POWER_DISCONNECTED")
                     E: receiver (line=157)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=162)
                         E: action (line=163)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_OKAY" (Raw: "android.intent.action.BATTERY_OKAY")
                         E: action (line=164)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_LOW" (Raw: "android.intent.action.BATTERY_LOW")
                     E: receiver (line=167)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=172)
                         E: action (line=173)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_LOW" (Raw: "android.intent.action.DEVICE_STORAGE_LOW")
                         E: action (line=174)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_OK" (Raw: "android.intent.action.DEVICE_STORAGE_OK")
                     E: receiver (line=177)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=182)
                         E: action (line=183)
                           A: android:name(0x01010003)="android.net.conn.CONNECTIVITY_CHANGE" (Raw: "android.net.conn.CONNECTIVITY_CHANGE")
                     E: receiver (line=186)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.RescheduleReceiver" (Raw: "androidx.work.impl.background.systemalarm.RescheduleReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=191)
                         E: action (line=192)
                           A: android:name(0x01010003)="android.intent.action.BOOT_COMPLETED" (Raw: "android.intent.action.BOOT_COMPLETED")
                         E: action (line=193)
                           A: android:name(0x01010003)="android.intent.action.TIME_SET" (Raw: "android.intent.action.TIME_SET")
                         E: action (line=194)
                           A: android:name(0x01010003)="android.intent.action.TIMEZONE_CHANGED" (Raw: "android.intent.action.TIMEZONE_CHANGED")
                     E: receiver (line=197)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=202)
                         E: action (line=203)
                           A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.UpdateProxies" (Raw: "androidx.work.impl.background.systemalarm.UpdateProxies")
                     E: receiver (line=206)
                       A: android:name(0x01010003)="androidx.work.impl.diagnostics.DiagnosticsReceiver" (Raw: "androidx.work.impl.diagnostics.DiagnosticsReceiver")
                       A: android:permission(0x01010006)="android.permission.DUMP" (Raw: "android.permission.DUMP")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=212)
                         E: action (line=213)
                           A: android:name(0x01010003)="androidx.work.diagnostics.REQUEST_DIAGNOSTICS" (Raw: "androidx.work.diagnostics.REQUEST_DIAGNOSTICS")
                     E: meta-data (line=217)
                       A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                       A: android:value(0x01010024)[email protected]
                     E: service (line=221)
                       A: android:name(0x01010003)="androidx.room.MultiInstanceInvalidationService" (Raw: "androidx.room.MultiInstanceInvalidationService")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
    [   +9 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
    [  +14 ms] <- compile package:admob_inline_ads_in_flutter/main.dart
    [  +35 ms] --------- beginning of main
               01-10 08:17:20.250 D/BoundBrokerSvc( 1114): onUnbind: Intent { act=com.google.android.gms.clearcut.bootcount.service.START pkg=com.google.android.gms }
    [   +8 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe version
    [  +24 ms] Android Debug Bridge version 1.0.41
               Version 31.0.3-7562133
               Installed as C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe
    [   +1 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
    [  +37 ms] Building APK
    [  +13 ms] Running Gradle task 'assembleDebug'...
    [   +3 ms] Using gradle from C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\android\gradlew.bat.
    [  +13 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [ +128 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [   +1 ms] openjdk version "11.0.10" 2021-01-19
               OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
               OpenJDK 64-Bit Server VM (build 11.0.10+0-b96-7249189, mixed mode)
    [   +1 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [ +108 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [   +1 ms] openjdk version "11.0.10" 2021-01-19
               OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
               OpenJDK 64-Bit Server VM (build 11.0.10+0-b96-7249189, mixed mode)
    [   +2 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [ +106 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [        ] openjdk version "11.0.10" 2021-01-19
               OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
               OpenJDK 64-Bit Server VM (build 11.0.10+0-b96-7249189, mixed mode)
    [   +1 ms] executing: [C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\android/] C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86
    -Ptarget=C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\lib\main.dart -Pbase-application-name=android.app.Application -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false
    -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
    [+1425 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE
    [   +1 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
    [        ] > Task :app:preBuild UP-TO-DATE
    [        ] > Task :app:preDebugBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:preBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:preDebugBuild UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugAidl NO-SOURCE
    [        ] > Task :app:compileDebugAidl NO-SOURCE
    [        ] > Task :google_mobile_ads:packageDebugRenderscript NO-SOURCE
    [        ] > Task :app:compileDebugRenderscript NO-SOURCE
    [        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
    [  +82 ms] > Task :google_mobile_ads:writeDebugAarMetadata UP-TO-DATE
    [   +1 ms] > Task :app:checkDebugAarMetadata UP-TO-DATE
    [        ] > Task :app:cleanMergeDebugAssets
    [        ] > Task :app:mergeDebugShaders UP-TO-DATE
    [        ] > Task :app:compileDebugShaders NO-SOURCE
    [        ] > Task :app:generateDebugAssets UP-TO-DATE
    [ +107 ms] > Task :google_mobile_ads:mergeDebugShaders UP-TO-DATE
    [   +2 ms] > Task :google_mobile_ads:compileDebugShaders NO-SOURCE
    [        ] > Task :google_mobile_ads:generateDebugAssets UP-TO-DATE
    [        ] > Task :google_mobile_ads:packageDebugAssets UP-TO-DATE
    [        ] > Task :app:mergeDebugAssets
    [ +283 ms] > Task :app:copyFlutterAssetsDebug
    [   +1 ms] > Task :app:generateDebugResValues UP-TO-DATE
    [        ] > Task :app:generateDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugRenderscript NO-SOURCE
    [        ] > Task :google_mobile_ads:generateDebugResValues UP-TO-DATE
    [        ] > Task :google_mobile_ads:generateDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:packageDebugResources UP-TO-DATE
    [        ] > Task :app:mergeDebugResources UP-TO-DATE
    [        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
    [        ] > Task :app:extractDeepLinksDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:extractDeepLinksDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:processDebugManifest UP-TO-DATE
    [        ] > Task :app:processDebugMainManifest UP-TO-DATE
    [        ] > Task :app:processDebugManifest UP-TO-DATE
    [        ] > Task :app:processDebugManifestForPackage UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugLibraryResources UP-TO-DATE
    [ +100 ms] > Task :google_mobile_ads:parseDebugLocalResources UP-TO-DATE
    [   +1 ms] > Task :google_mobile_ads:generateDebugRFile UP-TO-DATE
    [   +1 ms] > Task :app:processDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:generateDebugBuildConfig UP-TO-DATE
    [        ] > Task :google_mobile_ads:javaPreCompileDebug UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugJavaWithJavac UP-TO-DATE
    [        ] > Task :google_mobile_ads:bundleLibCompileToJarDebug UP-TO-DATE
    [        ] > Task :app:compileDebugKotlin UP-TO-DATE
    [        ] > Task :app:javaPreCompileDebug UP-TO-DATE
    [        ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
    [        ] > Task :app:compileDebugSources UP-TO-DATE
    [        ] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
    [        ] > Task :app:compressDebugAssets UP-TO-DATE
    [        ] > Task :app:processDebugJavaRes NO-SOURCE
    [        ] > Task :google_mobile_ads:processDebugJavaRes NO-SOURCE
    [        ] > Task :google_mobile_ads:bundleLibResDebug NO-SOURCE
    [        ] > Task :app:mergeDebugJavaResource UP-TO-DATE
    [        ] > Task :google_mobile_ads:bundleLibRuntimeToJarDebug UP-TO-DATE
    [  +82 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
    [   +1 ms] > Task :app:dexBuilderDebug UP-TO-DATE
    [        ] > Task :app:desugarDebugFileDependencies UP-TO-DATE
    [        ] > Task :app:mergeExtDexDebug UP-TO-DATE
    [        ] > Task :app:mergeDexDebug UP-TO-DATE
    [        ] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugJniLibFolders UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugNativeLibs NO-SOURCE
    [        ] > Task :google_mobile_ads:stripDebugDebugSymbols NO-SOURCE
    [        ] > Task :google_mobile_ads:copyDebugJniLibsProjectOnly UP-TO-DATE
    [  +88 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
    [   +1 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
    [   +1 ms] > Task :app:validateSigningDebug UP-TO-DATE
    [        ] > Task :app:packageDebug UP-TO-DATE
    [ +108 ms] > Task :app:assembleDebug
    [   +1 ms] > Task :google_mobile_ads:copyDebugJniLibsProjectAndLocalJars UP-TO-DATE
    [        ] > Task :google_mobile_ads:extractDebugAnnotations UP-TO-DATE
    [  +51 ms] > Task :google_mobile_ads:mergeDebugGeneratedProguardFiles UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugConsumerProguardFiles UP-TO-DATE
    [        ] > Task :google_mobile_ads:prepareLintJarForPublish UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugJavaResource UP-TO-DATE
    [        ] > Task :google_mobile_ads:syncDebugLibJars UP-TO-DATE
    [        ] > Task :google_mobile_ads:bundleDebugAar UP-TO-DATE
    [        ] > Task :google_mobile_ads:mergeDebugResources UP-TO-DATE
    [        ] > Task :google_mobile_ads:compileDebugSources UP-TO-DATE
    [        ] > Task :google_mobile_ads:assembleDebug UP-TO-DATE
    [        ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    [        ] Use '--warning-mode all' to show the individual deprecation warnings.
    [        ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
    [        ] BUILD SUCCESSFUL in 2s
    [        ] 58 actionable tasks: 4 executed, 54 up-to-date
    [ +535 ms] Running Gradle task 'assembleDebug'... (completed in 3,3s)
    [  +54 ms] calculateSha: LocalDirectory: 'C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\build\app\outputs\flutter-apk'/app.apk
    [ +546 ms] √  Built build\app\outputs\flutter-apk\app-debug.apk.
    [   +3 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\build-tools\31.0.0-rc2\aapt dump xmltree C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [  +18 ms] Exit code 0 from: C:\Users\leif0\AppData\Local\Android\sdk\build-tools\31.0.0-rc2\aapt dump xmltree C:\Dev\Common\admob-inline-ads-in-flutter\complete_kotlin_swift\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [        ] N: android=http://schemas.android.com/apk/res/android
                 E: manifest (line=2)
                   A: android:versionCode(0x0101021b)=(type 0x10)0x1
                   A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
                   A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1f
                   A: android:compileSdkVersionCodename(0x01010573)="12" (Raw: "12")
                   A: package="com.codelab.flutter.admobinlineads" (Raw: "com.codelab.flutter.admobinlineads")
                   A: platformBuildVersionCode=(type 0x10)0x1f
                   A: platformBuildVersionName=(type 0x10)0xc
                   E: uses-sdk (line=7)
                     A: android:minSdkVersion(0x0101020c)=(type 0x10)0x13
                     A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1f
                   E: uses-permission (line=14)
                     A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
                   E: uses-permission (line=15)
                     A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
                   E: uses-permission (line=16)
                     A: android:name(0x01010003)="com.google.android.gms.permission.AD_ID" (Raw: "com.google.android.gms.permission.AD_ID")
                   E: queries (line=17)
                     E: intent (line=20)
                       E: action (line=21)
                         A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
                       E: category (line=23)
                         A: android:name(0x01010003)="android.intent.category.BROWSABLE" (Raw: "android.intent.category.BROWSABLE")
                       E: data (line=25)
                         A: android:scheme(0x01010027)="https" (Raw: "https")
                     E: intent (line=29)
                       E: action (line=30)
                         A: android:name(0x01010003)="android.support.customtabs.action.CustomTabsService" (Raw: "android.support.customtabs.action.CustomTabsService")
                   E: uses-permission (line=35)
                     A: android:name(0x01010003)="android.permission.WAKE_LOCK" (Raw: "android.permission.WAKE_LOCK")
                   E: uses-permission (line=36)
                     A: android:name(0x01010003)="android.permission.RECEIVE_BOOT_COMPLETED" (Raw: "android.permission.RECEIVE_BOOT_COMPLETED")
                   E: uses-permission (line=37)
                     A: android:name(0x01010003)="android.permission.FOREGROUND_SERVICE" (Raw: "android.permission.FOREGROUND_SERVICE")
                   E: application (line=39)
                     A: android:label(0x01010001)="AdMob Inline Ads" (Raw: "AdMob Inline Ads")
                     A: android:icon(0x01010002)[email protected]
                     A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                     A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                     E: activity (line=44)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.codelab.flutter.admobinlineads.MainActivity" (Raw: "com.codelab.flutter.admobinlineads.MainActivity")
                       A: android:launchMode(0x0101001d)=(type 0x10)0x1
                       A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                       A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                       A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                       E: meta-data (line=58)
                         A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                         A: android:resource(0x01010025)[email protected]
                       E: meta-data (line=68)
                         A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                         A: android:resource(0x01010025)[email protected]
                       E: intent-filter (line=72)
                         E: action (line=73)
                           A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                         E: category (line=75)
                           A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                     E: meta-data (line=82)
                       A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                       A: android:value(0x01010024)=(type 0x10)0x2
                     E: meta-data (line=87)
                       A: android:name(0x01010003)="com.google.android.gms.ads.APPLICATION_ID" (Raw: "com.google.android.gms.ads.APPLICATION_ID")
                       A: android:value(0x01010024)="ca-app-pub-3940256099942544~3220297310" (Raw: "ca-app-pub-3940256099942544~3220297310")
                     E: meta-data (line=90)
                       A: android:name(0x01010003)="io.flutter.embedded_views_preview" (Raw: "io.flutter.embedded_views_preview")
                       A: android:value(0x01010024)=(type 0x12)0xffffffff
                     E: provider (line=94)
                       A: android:name(0x01010003)="androidx.lifecycle.ProcessLifecycleOwnerInitializer" (Raw: "androidx.lifecycle.ProcessLifecycleOwnerInitializer")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:multiprocess(0x01010013)=(type 0x12)0xffffffff
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.lifecycle-process" (Raw: "com.codelab.flutter.admobinlineads.lifecycle-process")
                     E: activity (line=99)
                       A: android:theme(0x01010000)[email protected]
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdActivity" (Raw: "com.google.android.gms.ads.AdActivity")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:configChanges(0x0101001f)=(type 0x11)0xfb0
                     E: provider (line=105)
                       A: android:name(0x01010003)="com.google.android.gms.ads.MobileAdsInitProvider" (Raw: "com.google.android.gms.ads.MobileAdsInitProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.mobileadsinitprovider" (Raw: "com.codelab.flutter.admobinlineads.mobileadsinitprovider")
                       A: android:initOrder(0x0101001a)=(type 0x10)0x64
                     E: service (line=111)
                       A: android:name(0x01010003)="com.google.android.gms.ads.AdService" (Raw: "com.google.android.gms.ads.AdService")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                     E: provider (line=116)
                       A: android:name(0x01010003)="androidx.startup.InitializationProvider" (Raw: "androidx.startup.InitializationProvider")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:authorities(0x01010018)="com.codelab.flutter.admobinlineads.androidx-startup" (Raw: "com.codelab.flutter.admobinlineads.androidx-startup")
                       E: meta-data (line=120)
                         A: android:name(0x01010003)="androidx.work.WorkManagerInitializer" (Raw: "androidx.work.WorkManagerInitializer")
                         A: android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
                     E: service (line=125)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.SystemAlarmService" (Raw: "androidx.work.impl.background.systemalarm.SystemAlarmService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=130)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemjob.SystemJobService" (Raw: "androidx.work.impl.background.systemjob.SystemJobService")
                       A: android:permission(0x01010006)="android.permission.BIND_JOB_SERVICE" (Raw: "android.permission.BIND_JOB_SERVICE")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: service (line=136)
                       A: android:name(0x01010003)="androidx.work.impl.foreground.SystemForegroundService" (Raw: "androidx.work.impl.foreground.SystemForegroundService")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=142)
                       A: android:name(0x01010003)="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver" (Raw: "androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                     E: receiver (line=147)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=152)
                         E: action (line=153)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_CONNECTED" (Raw: "android.intent.action.ACTION_POWER_CONNECTED")
                         E: action (line=154)
                           A: android:name(0x01010003)="android.intent.action.ACTION_POWER_DISCONNECTED" (Raw: "android.intent.action.ACTION_POWER_DISCONNECTED")
                     E: receiver (line=157)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=162)
                         E: action (line=163)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_OKAY" (Raw: "android.intent.action.BATTERY_OKAY")
                         E: action (line=164)
                           A: android:name(0x01010003)="android.intent.action.BATTERY_LOW" (Raw: "android.intent.action.BATTERY_LOW")
                     E: receiver (line=167)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=172)
                         E: action (line=173)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_LOW" (Raw: "android.intent.action.DEVICE_STORAGE_LOW")
                         E: action (line=174)
                           A: android:name(0x01010003)="android.intent.action.DEVICE_STORAGE_OK" (Raw: "android.intent.action.DEVICE_STORAGE_OK")
                     E: receiver (line=177)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=182)
                         E: action (line=183)
                           A: android:name(0x01010003)="android.net.conn.CONNECTIVITY_CHANGE" (Raw: "android.net.conn.CONNECTIVITY_CHANGE")
                     E: receiver (line=186)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.RescheduleReceiver" (Raw: "androidx.work.impl.background.systemalarm.RescheduleReceiver")
                       A: android:enabled(0x0101000e)=(type 0x12)0x0
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=191)
                         E: action (line=192)
                           A: android:name(0x01010003)="android.intent.action.BOOT_COMPLETED" (Raw: "android.intent.action.BOOT_COMPLETED")
                         E: action (line=193)
                           A: android:name(0x01010003)="android.intent.action.TIME_SET" (Raw: "android.intent.action.TIME_SET")
                         E: action (line=194)
                           A: android:name(0x01010003)="android.intent.action.TIMEZONE_CHANGED" (Raw: "android.intent.action.TIMEZONE_CHANGED")
                     E: receiver (line=197)
                       A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver" (Raw: "androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver")
                       A: android:enabled(0x0101000e)[email protected]
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=202)
                         E: action (line=203)
                           A: android:name(0x01010003)="androidx.work.impl.background.systemalarm.UpdateProxies" (Raw: "androidx.work.impl.background.systemalarm.UpdateProxies")
                     E: receiver (line=206)
                       A: android:name(0x01010003)="androidx.work.impl.diagnostics.DiagnosticsReceiver" (Raw: "androidx.work.impl.diagnostics.DiagnosticsReceiver")
                       A: android:permission(0x01010006)="android.permission.DUMP" (Raw: "android.permission.DUMP")
                       A: android:enabled(0x0101000e)=(type 0x12)0xffffffff
                       A: android:exported(0x01010010)=(type 0x12)0xffffffff
                       A: android:directBootAware(0x01010505)=(type 0x12)0x0
                       E: intent-filter (line=212)
                         E: action (line=213)
                           A: android:name(0x01010003)="androidx.work.diagnostics.REQUEST_DIAGNOSTICS" (Raw: "androidx.work.diagnostics.REQUEST_DIAGNOSTICS")
                     E: meta-data (line=217)
                       A: android:name(0x01010003)="com.google.android.gms.version" (Raw: "com.google.android.gms.version")
                       A: android:value(0x01010024)[email protected]
                     E: service (line=221)
                       A: android:name(0x01010003)="androidx.room.MultiInstanceInvalidationService" (Raw: "androidx.room.MultiInstanceInvalidationService")
                       A: android:exported(0x01010010)=(type 0x12)0x0
                       A: android:directBootAware(0x01010505)=(type 0x12)0xffffffff
    [   +5 ms] Stopping app 'app.apk' on sdk gphone x86.
    [        ] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am force-stop com.codelab.flutter.admobinlineads
    [  +42 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell pm list packages com.codelab.flutter.admobinlineads
    [  +35 ms] package:com.codelab.flutter.admobinlineads
    [   +2 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell cat /data/local/tmp/sky.com.codelab.flutter.admobinlineads.sha1
    [  +30 ms] 58460360b5985fa2d2ed75683f96ebb9486af0a3
    [   +1 ms] Latest build already installed.
    [        ] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
    [  +26 ms] --------- beginning of main
               01-10 08:17:31.991 I/cmd     ( 6623): oneway function results will be dropped but finished with status OK and parcel size 4
    [   +4 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true
    --ez enable-checked-mode true --ez verify-entry-points true com.codelab.flutter.admobinlineads/com.codelab.flutter.admobinlineads.MainActivity
    [  +37 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.codelab.flutter.admobinlineads/.MainActivity (has extras) }
    [        ] Waiting for observatory port to be available...
    [ +352 ms] W/FlutterActivityAndFragmentDelegate( 6640): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
    [  +59 ms] Observatory URL on device: http://127.0.0.1:37981/JJI9v3nS2uk=/
    [   +1 ms] executing: C:\Users\leif0\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:37981
    [  +18 ms] 61647
    [   +1 ms] Forwarded host port 61647 to device port 37981 for Observatory
    [   +5 ms] Caching compiled dill
    [  +25 ms] Connecting to service protocol: http://127.0.0.1:61647/JJI9v3nS2uk=/
    [ +334 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:61647/JJI9v3nS2uk=/.
    [ +142 ms] DDS is listening at http://127.0.0.1:61650/vqCLOLYpqI4=/.
    [  +43 ms] Successfully connected to service protocol: http://127.0.0.1:61647/JJI9v3nS2uk=/
    [  +57 ms] DevFS: Creating new filesystem on the device (null)
    [  +28 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.codelab.flutter.admobinlineads/code_cache/complete_kotlin_swiftLVPCJR/complete_kotlin_swift/)
    [   +2 ms] Updating assets
    [  +86 ms] Syncing files to device sdk gphone x86...
    [   +2 ms] <- reset
    [        ] Compiling dart to kernel with 0 updated files
    [   +4 ms] <- recompile package:admob_inline_ads_in_flutter/main.dart 61183c33-8a58-4f72-a4ec-03c41f05f1cc
    [        ] <- 61183c33-8a58-4f72-a4ec-03c41f05f1cc
    [  +91 ms] Updating files.
    [   +1 ms] DevFS: Sync finished
    [   +2 ms] Syncing files to device sdk gphone x86... (completed in 101ms)
    [        ] Synced 0.0MB.
    [   +1 ms] <- accept
    [   +4 ms] Connected to _flutterView/0xe5a092b0.
    [   +2 ms] Flutter run key commands.
    [   +1 ms] r Hot reload. 
    [   +2 ms] R Hot restart.
    [        ] h List all available interactive commands.
    [        ] d Detach (terminate "flutter run" but leave application running).
    [   +1 ms] c Clear the screen
    [        ] q Quit (terminate the application on the device).
    [        ]  Running with sound null safety 
    [   +1 ms] An Observatory debugger and profiler on sdk gphone x86 is available at: http://127.0.0.1:61650/vqCLOLYpqI4=/
    [ +419 ms] I/.admobinlinead( 6640): The ClassLoaderContext is a special shared library.
    [   +2 ms] I/.admobinlinead( 6640): The ClassLoaderContext is a special shared library.
    [  +24 ms] I/.admobinlinead( 6640): The ClassLoaderContext is a special shared library.
    [        ] I/DynamiteModule( 6640): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:214106404
    [        ] I/DynamiteModule( 6640): Selected remote version of com.google.android.gms.ads.dynamite, version >= 214106404
    [   +2 ms] D/DynamitePackage( 6640): Instantiated singleton DynamitePackage.
    [   +1 ms] D/DynamitePackage( 6640): Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
    [  +47 ms] W/ConnectionStatusConfig( 6640): Dynamic lookup for intent failed for action: com.google.android.gms.leibniz.events.service.START
    [   +2 ms] W/GmsClient( 6640): unable to connect to service: com.google.android.gms.leibniz.events.service.START on com.google.android.gms
    [  +55 ms] I/WebViewFactory( 6640): Loading com.google.android.webview version 96.0.4664.104 (code 466410431)
    [  +22 ms] W/.admobinlinead( 6640): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (greylist, reflection, allowed)
    [        ] W/.admobinlinead( 6640): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (greylist, reflection, allowed)
    [        ] W/.admobinlinead( 6640): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (greylist, reflection, allowed)
    [        ] W/.admobinlinead( 6640): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (greylist, reflection, allowed)
    [        ] W/.admobinlinead( 6640): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (greylist, reflection, allowed)
    [        ] I/cr_WVCFactoryProvider( 6640): Loaded version=96.0.4664.104 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
    [  +24 ms] I/cr_LibraryLoader( 6640): Successfully loaded native library
    [   +1 ms] I/cr_CachingUmaRecorder( 6640): Flushed 8 samples from 8 histograms.
    [ +131 ms] W/.admobinlinead( 6640): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
    [   +1 ms] D/HostConnection( 6640): HostConnection::get() New Host Connection established 0xebcaff00, tid 6750
    [  +14 ms] W/cr_media( 6640): Requires BLUETOOTH permission
    [        ] D/HostConnection( 6640): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem
    ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements
    ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit
    ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
    [   +1 ms] E/chromium( 6640): [ERROR:gl_surface_egl.cc(582)] eglChooseConfig failed with error EGL_SUCCESS
    [  +21 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebcb0bb0: maj 2 min 0 rcv 2
    [        ] D/EGL_emulation( 6640): eglMakeCurrent: 0xebcb0bb0: ver 2 0 (tinfo 0xb795b6b0) (first time)
    [  +16 ms] E/chromium( 6640): [ERROR:gl_surface_egl.cc(582)] eglChooseConfig failed with error EGL_SUCCESS
    [  +10 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebca0a00: maj 2 min 0 rcv 2
    [  +39 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebcac770: maj 2 min 0 rcv 2
    [ +148 ms] The Flutter DevTools debugger and profiler on sdk gphone x86 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:61650/vqCLOLYpqI4=/
    [+1952 ms] D/DynamitePackage( 6640): Instantiating com.google.android.gms.ads.ChimeraAdLoaderBuilderCreatorImpl
    [  +17 ms] I/Ads     ( 6640): This request is sent from a test device.
    [ +141 ms] D/DynamitePackage( 6640): Instantiating com.google.android.gms.ads.ChimeraAdLoaderBuilderCreatorImpl
    [  +10 ms] I/Ads     ( 6640): This request is sent from a test device.
    [  +17 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebcafb80: maj 2 min 0 rcv 2
    [ +240 ms] W/Ads     ( 6640): Not retrying to fetch app settings
    [   +2 ms] W/Ads     ( 6640): Not retrying to fetch app settings
    [ +693 ms] I/DynamiteModule( 6640): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:214106404
    [   +1 ms] I/DynamiteModule( 6640): Selected remote version of com.google.android.gms.ads.dynamite, version >= 214106404
    [   +8 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebc89000: maj 2 min 0 rcv 2
    [  +78 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebcac690: maj 2 min 0 rcv 2
    [   +1 ms] D/DynamitePackage( 6640): Instantiating com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl
    [ +116 ms] I/DynamiteModule( 6640): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:214106404
    [   +1 ms] I/DynamiteModule( 6640): Selected remote version of com.google.android.gms.ads.dynamite, version >= 214106404
    [  +23 ms] D/DynamitePackage( 6640): Instantiating com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl
    [ +155 ms] D/EGL_emulation( 6640): eglMakeCurrent: 0xebca7370: ver 2 0 (tinfo 0xebffcc90) (first time)
    [   +4 ms] W/Gralloc4( 6640): allocator 3.x is not supported
    [+3465 ms] D/EGL_emulation( 6640): eglCreateContext: 0xebcb18d0: maj 2 min 0 rcv 2
    [+3517 ms] Application finished.
    
    Analyzing complete_kotlin_swift...
    No issues found! (ran in 1.5s)
    
    [√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1415], locale de-DE)
        • Flutter version 2.8.1 at C:\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 77d935af4d (4 weeks ago), 2021-12-16 08:37:33 -0800
        • Engine revision 890a5fca2e
        • Dart version 2.15.1
    
    [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
        • Android SDK at C:\Users\leif0\AppData\Local\Android\sdk
        • Platform android-31, build-tools 31.0.0-rc2
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Android Studio (version 2020.3)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [√] Connected device (2 available)
        • Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.71
        • Edge (web)   • edge   • web-javascript • Microsoft Edge 96.0.1054.62
    
    • No issues found!
    
    
    bug p2-medium e2-days platform-android native ad 
    opened by leifhacks 1
  • Adcolony mediation not working

    Adcolony mediation not working

    Plugin Version

      google_mobile_ads: 0.13.4
    
     implementation 'com.adcolony:sdk:4.6.3'
     implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
     implementation 'com.google.ads.mediation:adcolony:4.6.0.0'
    

    Steps to Reproduce

    add all above dependencies and init the app with moblie ads

    1. Run flutter create bug.
    2. Update the files as follows: ...
    3. ...

    Expected results: Adcolony ads working Actual results: W/AdColonyMediationAdapter( 9559): Unexpected SDK version format: . Returning 0.0.0 for SDK version.

    Logs
    bug mediation p3-low e2-days platform-android 
    opened by gametathya 7
  • Flutter Android TV Could not create remote AdOverlay.

    Flutter Android TV Could not create remote AdOverlay.

    I use this plugin - google_mobile_ads: ^1.0.1 with flutter version 2.8 and when I use android tv emulator or physical android TV and trying to show rewarder ads - I am getting the error listed below. Only in case using emulator as cold boot - ads appear, while in any other case I am getting the error below. This app is running on both tv and mobile android, but error appears only in TV case.

    To reproduce this bug we only needs to wait till rewarded video got ready and call method show().

    
    W/Ads     (24254): Could not create remote AdOverlay.
    W/Ads     (24254): com.google.android.gms.dynamic.RemoteCreator$RemoteCreatorException: Could not load creator class.
    W/Ads     (24254): 	at com.google.android.gms.dynamic.RemoteCreator.getRemoteCreatorInstance(com.google.android.gms:[email protected]@17.6.0:10)
    W/Ads     (24254): 	at com.google.android.gms.internal.ads.zzbzc.zza(com.google.android.gms:[email protected]@20.4.0:2)
    W/Ads     (24254): 	at com.google.android.gms.internal.ads.zzbdn.zzb(com.google.android.gms:[email protected]@20.4.0:10)
    W/Ads     (24254): 	at com.google.android.gms.internal.ads.zzbei.zzf(com.google.android.gms:[email protected]@20.4.0:1)
    W/Ads     (24254): 	at com.google.android.gms.internal.ads.zzbei.zzd(com.google.android.gms:[email protected]@20.4.0:11)
    W/Ads     (24254): 	at com.google.android.gms.internal.ads.zzbeh.zzg(com.google.android.gms:[email protected]@20.4.0:6)
    W/Ads     (24254): 	at com.google.android.gms.ads.AdActivity.onCreate(com.google.android.gms:[email protected]@20.4.0:2)
    W/Ads     (24254): 	at android.app.Activity.performCreate(Activity.java:8000)
    W/Ads     (24254): 	at android.app.Activity.performCreate(Activity.java:7984)
    W/Ads     (24254): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
    W/Ads     (24254): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
    W/Ads     (24254): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
    W/Ads     (24254): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
    W/Ads     (24254): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    W/Ads     (24254): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    W/Ads     (24254): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
    W/Ads     (24254): 	at android.os.Handler.dispatchMessage(Handler.java:106)
    W/Ads     (24254): 	at android.os.Looper.loop(Looper.java:223)
    W/Ads     (24254): 	at android.app.ActivityThread.main(ActivityThread.java:7656)
    W/Ads     (24254): 	at java.lang.reflect.Method.invoke(Native Method)
    W/Ads     (24254): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    W/Ads     (24254): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
    W/Ads     (24254): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.AdOverlayCreatorImpl" on path: DexPathList[[zip file "/data/app/~~FIxdgodSAcPeidSu2EzrdA==/com.google.android.gms-ROxYmhnz6Pp9tczwz0GqLQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~FIxdgodSAcPeidSu2EzrdA==/com.google.android.gms-ROxYmhnz6Pp9tczwz0GqLQ==/lib/x86, /data/app/~~FIxdgodSAcPeidSu2EzrdA==/com.google.android.gms-ROxYmhnz6Pp9tczwz0GqLQ==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
    W/Ads     (24254): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
    W/Ads     (24254): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    W/Ads     (24254): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    W/Ads     (24254): 	at com.google.android.gms.dynamic.RemoteCreator.getRemoteCreatorInstance(com.google.android.gms:[email protected]@17.6.0:5)
    W/Ads     (24254): 	... 21 more
    
    feedback required in triage 
    opened by Treamz 1
  • [Feature Request] Add option to configure/disable logging

    [Feature Request] Add option to configure/disable logging

    Hello, I am currently using interstitial ads in my app and the package is spamming my console with logs to the point where I cannot read any other important logs. The package does this whenever I run the app or load an interstitial ad. I've attached a video below that show what my console looks like. I am 100% sure that the ad package is the one that spams the logs because when I comment out the interstitial ads, the logs are gone.

    https://user-images.githubusercontent.com/29833473/147183925-4fc38a23-4af7-4c2a-813f-e3f5305b937d.mp4

    It would be nice if there was some option that I could pass when initializing the ad package to disable or change the logging level the package has.

    The feature could be something like this:

      MobileAds.instance.initialize(debug: true);
    

    or

      MobileAds.logLevel = MobileAdsLogLevel.warning;
    

    With different logging levels that could be set.

    feature request 
    opened by Tetracyl 1
  • Fatal Exception: java.lang.LinkageError

    Fatal Exception: java.lang.LinkageError

    Firebase crash analytics is reporting the following error on android devices

    Fatal Exception: java.lang.LinkageError: Method java.lang.Object com.google.android.gms.internal.ads.jo3.zzb() overrides final method in class Lcom/google/android/gms/internal/ads/bo3; (declaration of 'com.google.android.gms.internal.ads.jo3' appears in base.apk)
           at com.google.android.gms.internal.ads.zzcpr.<init>(zzcpr.java:310)
           at com.google.android.gms.internal.ads.zzcpq.zza(zzcpq.java:103)
           at com.google.android.gms.internal.ads.zzevk.zza(zzevk.java:365)
           at com.google.android.gms.internal.ads.zzeke.zzN(zzeke.java:58)
           at com.google.android.gms.internal.ads.zzeke.zze(zzeke.java:6)
           at com.google.android.gms.internal.ads.zzbhd.zzg(zzbhd.java:203)
           at com.google.android.gms.ads.BaseAdView.loadAd(BaseAdView.java:6)
           at io.flutter.plugins.googlemobileads.FlutterBannerAd.load(FlutterBannerAd.java:60)
           at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:737)
           at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:17)
           at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:18)
           at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0(DartMessenger.java:20)
           at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0$DartMessenger(DartMessenger.java)
           at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$6ZD1MYkhaLxyPjtoFDxe45u43DI.run(-.java:12)
           at android.os.Handler.handleCallback(Handler.java:938)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:246)
           at android.app.ActivityThread.main(ActivityThread.java:8550)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    

    This is the line it errors on

    at io.flutter.plugins.googlemobileads.FlutterBannerAd.load(FlutterBannerAd.java:60)

    on the following devices

    image

    Im am using google_mobile_ads google_mobile_ads: ^1.0.1

    and Flutter 2.8.0

    Edit:

    This is our statefull widget

    class MyBannerAd extends StatefulWidget {
      const MyBannerAd();
    
      @override
      _MyBannerAdState createState() => _MyBannerAdState();
    }
    
    class _MyBannerAdState extends State<MyBannerAd> {
      late AdSize adSize;
      late AdMobRepository adRepository;
      late AnalyticsRepository analyticsRepository;
      bool adLoaded = false;
      BannerAd? anchoredBanner;
    
      @override
      void initState() {
        super.initState();
        adRepository = context.read<AdMobRepository>();
        analyticsRepository = context.read<AnalyticsRepository>();
    
        if (SizerUtil.deviceType != DeviceType.mobile && SizerUtil.orientation == Orientation.portrait) {
          adSize = AdSize.leaderboard;
        } else {
          adSize = AdSize.largeBanner;
        }
    
        final bannerAd = adRepository.getBannerAd(
          size: adSize,
          onFailedLoad: (ad, error) {
            print('banner ad failed to load: $error');
            ad.dispose();
          },
          onLoad: (ad) {
            setState(() {
              adLoaded = true;
              anchoredBanner = ad as BannerAd?;
            });
          },
          onAdImpression: (_) {
            analyticsRepository.sendBannerAdShownEvent();
          },
          onAdOpened: (_) {
            analyticsRepository.sendBannerAdClickEvent();
          },
        );
    
        bannerAd.load();
      }
    
      @override
      void dispose() {
        super.dispose();
        anchoredBanner?.dispose();
      }
    
      @override
      Widget build(BuildContext context) {
        return BlocBuilder<SubscriptionBloc, SubscriptionState>(
          builder: (context, state) {
            final isLoaded = !adLoaded;
    
            if (isLoaded || state.hasSubscribed || anchoredBanner == null) return SizedBox.shrink();
    
            return Container(
              color: Colors.transparent,
              width: anchoredBanner!.size.width.toDouble(),
              height: anchoredBanner!.size.height.toDouble(),
              child: Center(
                child: Container(
                  color: Colors.white,
                  child: AdWidget(
                    ad: anchoredBanner!,
                  ),
                ),
              ),
            );
          },
        );
      }
    }
    

    And this is the repo

    class AdMobRepository {
      late String _releaseBannerAdId;
      late String _releaseInterstitualAdId;
      late String _releaseRewardedAdId;
    
      AdMobRepository() {
        if (Platform.isAndroid) {
          _releaseBannerAdId = Constants.androidBannedAdId;
          _releaseInterstitualAdId = Constants.androidInterstitualAdId;
          _releaseRewardedAdId = Constants.androidRewardedAdId;
        } else if (Platform.isIOS) {
          _releaseBannerAdId = Constants.iosBannerAdId;
          _releaseInterstitualAdId = Constants.iosInterstitualAdId;
          _releaseRewardedAdId = Constants.iosRewardedAdId;
        } else {
          _releaseBannerAdId = "";
          _releaseInterstitualAdId = "";
          _releaseRewardedAdId = "";
        }
      }
    
      BannerAd getBannerAd({
        required AdSize size,
        void Function(Ad, LoadAdError)? onFailedLoad,
        void Function(Ad)? onLoad,
        void Function(Ad)? onAdOpened,
        void Function(Ad)? onAdImpression,
      }) {
        return BannerAd(
          adUnitId: kReleaseMode ? _releaseBannerAdId : BannerAd.testAdUnitId,
          request: AdRequest(),
          size: size,
          listener: BannerAdListener(
            onAdFailedToLoad: onFailedLoad ?? onFailedLoadFallback,
            onAdLoaded: onLoad,
            onAdImpression: onAdImpression,
            onAdOpened: onAdOpened,
          ),
        );
      }
    
      void onFailedLoadFallback(Ad ad, LoadAdError error) {
        ad.dispose();
      }
    
      void getInterstitualAd({required void Function(LoadAdError) onFailedLoad, void Function(InterstitialAd)? onLoad}) {
        InterstitialAd.load(
          adUnitId: kReleaseMode ? _releaseInterstitualAdId : InterstitialAd.testAdUnitId,
          request: AdRequest(),
          adLoadCallback: InterstitialAdLoadCallback(
            onAdLoaded: onLoad ?? onInterstitialAdLoadedFallback,
            onAdFailedToLoad: onFailedLoad,
          ),
        );
      }
    
      void onInterstitialAdLoadedFallback(InterstitialAd ad) {
        ad.fullScreenContentCallback = FullScreenContentCallback(
          onAdDismissedFullScreenContent: (ad) => ad.dispose(),
          onAdFailedToShowFullScreenContent: (ad, error) => ad.dispose(),
        );
      }
    
      void getRewardAd({required String userId, required void Function(LoadAdError) onFailedLoad, void Function(RewardedAd)? onLoad}) {
        RewardedAd.load(
          adUnitId: kReleaseMode ? _releaseRewardedAdId : RewardedAd.testAdUnitId,
          request: AdRequest(),
          rewardedAdLoadCallback: RewardedAdLoadCallback(
            onAdLoaded: onLoad ?? onRewardedAdLoadedFallback,
            onAdFailedToLoad: onFailedLoad,
          ),
          serverSideVerificationOptions: ServerSideVerificationOptions(userId: userId),
        );
      }
    
      void onRewardedAdLoadedFallback(RewardedAd ad) {
        ad.fullScreenContentCallback = FullScreenContentCallback(
          onAdDismissedFullScreenContent: (ad) => ad.dispose(),
          onAdFailedToShowFullScreenContent: (ad, error) => ad.dispose(),
        );
      }
    }
    
    bug p2-medium e3-weeks platform-android 
    opened by michael-ottink 18
  • [Interstitial ad] Callback when  interstitial ads are clicked

    [Interstitial ad] Callback when interstitial ads are clicked

    Anyone here can help me?

    I need to handle ads click on interstitial popup ads but it seems flutter version of google ads doesn't support. It's really important for us, please help!

    feature request interstitial ad 
    opened by diepnle63 7
  • Screen flickering when navigating to a new screen. This happens after updating to the latest 1.0.1 version.

    Screen flickering when navigating to a new screen. This happens after updating to the latest 1.0.1 version.

    Screen flickering when navigating to a new screen. This happens after updating to the latest 1.0.1 version. Before the update, everything worked well. If removes banner ad navigation works well.

    Attaching video of this issue

    https://user-images.githubusercontent.com/73931541/145559808-37c4a1d0-f57b-48fa-be1f-c6afcf1fb2a3.mp4

    Result of flutter doctor -v

    [✓] Flutter (Channel stable, 2.8.0, on Ubuntu 20.04.3 LTS 5.11.0-27-generic, locale en_GB.UTF-8) • Flutter version 2.8.0 at /home/mahek/flutter/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision cf44000065 (2 days ago), 2021-12-08 14:06:50 -0800 • Engine revision 40a99c5951 • Dart version 2.15.0

    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /home/mahek/Android/Sdk • Platform android-31, build-tools 30.0.3 • ANDROID_HOME = /home/mahek/Android/Sdk • Java binary at: /opt/android-studio-4.1/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.

    [✓] Chrome - develop for the web • Chrome at google-chrome

    [✓] Linux toolchain - develop for Linux desktop • clang version 10.0.0-4ubuntu1 • cmake version 3.16.3 • ninja version 1.10.0 • pkg-config version 0.29.1

    [✓] Android Studio (version 4.1) • Android Studio at /opt/android-studio-4.1/android-studio • Flutter plugin version 53.0.1 • Dart plugin version 201.9317 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

    [✓] Android Studio • Android Studio at /opt/android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

    [✓] VS Code (version 1.62.2) • VS Code at /usr/share/code • Flutter extension version 3.29.0

    [✓] Connected device (4 available) • ASUS X01BDA (mobile) • JBAAGF07Z4433FF • android-arm64 • Android 9 (API 28) • ASUS X01BDA (mobile) • 192.168.1.139:5555 • android-arm64 • Android 9 (API 28) • Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.3 LTS 5.11.0-27-generic • Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.45

    bug p2-medium e2-days platform-android 
    opened by wrteam-priyansh 25
Releases(v1.0.0)
  • v1.0.0(Nov 17, 2021)

    • Mediation is now supported in beta.

    • Fix for Android 12 issue #330.

      • This will break compilation on android if you do not already set compileSdkVersion to 31, or override the WorkManager dependency to < 2.7.0:
        dependencies {
            implementation('androidx.work:work-runtime') {
                version {
                    strictly '2.6.0'
                }
            }
        }
        
    • Fixes issue #404.

      • Adds a new dart class, AppStateEventNotifier. You should subscribe to AppStateEventNotifier.appStateStream instead of using WidgetsBindingObserver to listen to app foreground/background events.
      • See the app open example app for a reference on how to use the new API.
    • Adds a new parameter extras to AdRequest and AdManagerAdRequest.

      • This can be used to pass additional signals to the AdMob adapter, such as CCPA signals.
      • For example, to notify Google that RDP should be enabled when constructing an ad request:
          AdRequest request = AdRequest(extras: {'rdp': '1'});
        
        
    • The development guides in the README have been migrated to the AdMob and Ad Manager dev sites.

    Source code(tar.gz)
    Source code(zip)
  • v0.13.6(Nov 3, 2021)

    • Partial fix for #265.
      • The partial fix allows you to load ads from a cached flutter engine in the add to app scenario, but it only works the first time the engine is attached to an activity.
      • Support for reusing the engine in another activity after the first one is destroyed is blocked by this Flutter issue which affects all platform views: https://github.com/flutter/flutter/issues/88880.
    • Adds support for getRequestConfiguration API
    • Adds support for Fluid Ad Size (Ad Manager only)
      • Fluid ads dynamically adjust their height based on their width. To help display them we've added a new ad container, FluidAdManagerBannerAd, and a new widget FluidAdWidget.
      • You can see the fluid_example.dart for a reference of how to load and display a fluid ad.
      • Android API reference
      • iOS API reference
    • Adds AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize() to support getting an AnchoredAdaptiveBannerAdSize in the current orientation.
      • Previously the user had to specify an orientation (portrait / landscape) to create an AnchoredAdaptiveBannerAdSize. It has been made optional with this version. SDK will determine the current orientation of the device and return an appropriate AdSize.
      • More information on anchored adaptive banners can be found here:
    • Adds support for inline adaptive banner ads.
      • Inline adaptive banner ads are meant to be used in scrollable content. They are of variable height and can be as tall as the device screen. They differ from Fluid ads in that they only resize once when the ad is loaded. You can see the inline_adaptive_example.dart for a reference of how to load and display inline adaptive banners.
      • More information on inline adaptive banners can be found here:
    • Fix for #369
      • Fixes setting the app volume in android (doesn't affect iOS).
    • Adds support for setting location in AdRequest and AdManagerAdRequest.
      • Both AdRequest and AdManagerAdRequest have a new param, location.
      • Location data is not used to target Google Ads, but may be used by 3rd party ad networks.
      • See other packages for getting the location. For example, https://pub.dev/packages/location.
    • Adds publisherProvidedId to AdManagerAdRequest to support publisher provided ids.
    Source code(tar.gz)
    Source code(zip)
  • v0.13.5(Sep 27, 2021)

  • v0.13.4(Sep 27, 2021)

    • Adds support for muting and setting the volume level of the app.
    • Visit the following links for more information:
      • https://developers.google.com/admob/android/global-settings#video_ad_volume_control
      • https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#public-static-void-setappvolume-float-volume
    • Adds support for setting immersive mode for Rewarded and Interstitial Ads in Android.
    • Visit the following links for more information:
      • https://developers.google.com/android/reference/com/google/android/gms/ads/interstitial/InterstitialAd?hl=en#setImmersiveMode(boolean)
      • https://developers.google.com/android/reference/com/google/android/gms/ads/rewarded/RewardedAd#setImmersiveMode(boolean)
    • Adds support for disableSDKCrashReporting in iOS; disableMediationInitialization and getVersionString in both the platforms.
      • https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds#-disablesdkcrashreporting
      • iOS (disableMediationInitialization): https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds#-disablemediationinitialization
      • Android (disableMediationAdapterInitialization): https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#public-static-void-disablemediationadapterinitialization-context-context
      • https://developers.google.com/android/reference/com/google/android/gms/ads/MobileAds#getVersionString()
    Source code(tar.gz)
    Source code(zip)
  • v0.13.3(Aug 4, 2021)

  • v0.13.2+1(Jul 29, 2021)

  • v0.13.2(Jun 30, 2021)

  • v0.13.1(Jun 23, 2021)

  • v0.13.0(May 18, 2021)

    This is a major version bump that updates the GMA Android and iOS dependencies to 20.1.0 and 8.5.0. There are several breaking API changes.

    • Renames APIs that use the Publisher prefix to AdManager.
    • Rewarded and Interstitial ads now provide static load methods and a new FullScreenContentCallback for full screen events.
    • Native ads use GADNativeAdView for iOS and NativeAdView on Android.
    • Adds support for ResponseInfo.
    • Adds support for same app key on iOS.
    • Removes testDevices from AdRequest. Use MobileAds.updateRequestConfiguration to set test device ids.
    • Removes Ad.isLoaded(). Instead you should use the onAdLoaded callback to track whether an ad is loaded.
    • Removes need to call Ad.dispose() for Rewarded and Interstitial ads when they fail to load.
    Source code(tar.gz)
    Source code(zip)
  • v0.12.2+1(May 17, 2021)

  • v0.12.2(May 13, 2021)

  • v0.12.1(Apr 14, 2021)

  • v0.12.0(Mar 29, 2021)

  • v0.11.0+4(Mar 19, 2021)

  • v0.11.0+3(Mar 11, 2021)

  • v0.11.0+2(Mar 11, 2021)

    • Set min Android version to 19.
    • Fixes bug that displayed "This AdWidget is already in the Widget tree".
    • Update minimum gradle version.
    • Add references to the codelab in the README.
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0+1(Mar 11, 2021)

  • v0.11.0(Mar 3, 2021)

Owner
Google Ads
Google Ads
P2P payment solution using Stream's Flutter SDK and Rapyd's Wallet API

Peer-to-peer payment integration to a messaging app using Flutter ?? This project shows how to integrate a peer-to-peer payment solution to your Strea

Souvik Biswas 10 Nov 19, 2021
Timy - open source mobile app for groups to communicate and organize themselves. Built with flutter.

Timy app An amazing open-source group messaging app build with flutter. ✨ Main Features Multiple groups (similar to Teams in Slack). Multiple open or

null 1.8k Jan 13, 2022
This is a mobile application that goals to build a quiz about programming subjects writter with Flutter.

❓ DevQuiz A mobile application being built with NLW5 (an event from Rockeatseat - https://app.rocketseat.com.br/). This application goals to build a q

Samilly Nunes 16 Sep 15, 2021
:lock: this is flutter mobile application music using glass morphism concept

Flutter Glass Morphism ?? Description: This is source flutter using glass morphism concept How I can run it? ?? Clone this repo ?? Run below code in t

Dao Hong Vinh 11 Oct 31, 2021
Flutter UI Kits for mobile, tablet, desktop and web application

UIKits2 A complete UIs for mobile and tablet, which include 16 categories. Start SignUp & Login Walkthrough Loading Profiles Feed Article Activity Cre

Anuchit Chalothorn 15 Sep 22, 2021
Clone do aplicativo mobile da Nubank utilizando Flutter

Nubank Clone Introdução Screenshots Executando Contribua Introdução Este projeto se trata de uma recriação bem próxima da interface do app do Nubank u

Ricardo Dalarme 33 Jan 8, 2022
Mobile first Note Taking integrated with Git

Mobile first Markdown Notes integrated with Git This project receives generous infrastructure support from Summary GitJournal is a note taking app foc

GitJournal 1.8k Jan 17, 2022
freeCodeCamp's open-source mobile app

freeCodeCamp.org's open-source mobile app freeCodeCamp.org is a friendly community where you can learn to code for free. Our full-stack web developmen

freeCodeCamp.org 139 Jan 11, 2022
een mobile app voor de jaaruitwisseling van RYE

Rotary-NL-RYE een mobile app voor de jaaruitwisseling van RYE API calandar: https://www.googleapis.com/calendar/v3/calendars/[email protected]

Caeli Technologies 6 Nov 16, 2021
𝐂𝐨𝐯 𝐀𝐡𝐞𝐚𝐝 is a mobile application to track and create better Covid-19 route maps for both shop owners and customers

Cov Ahead Cov Ahead is a mobile application where shopkeepers have an app that shows QR code and users can scan this QR code which will automatically

Abhijith Kp 3 May 30, 2021
Materiale per il corso PON Programmazione Creativa dell'ITET Marsala - Modulo Mobile Dev

modulomobiledev-ponprogrammazionecreativa-itet Materiale a supporto delle lezioni del modulo Mobile Dev per il corso PON Programmazione Creativa degli

Enrico La Sala 3 Nov 8, 2021
Movie Lib is a mobile application where you can find the movies of your interest. This app provides a collection of movies of different languages according to your interest.

Movie Lib Movie Lib is a mobile application where you can find the movies of your interest. This app provides a collection of movies of different lang

Abhijith Kp 6 Sep 28, 2021
Noor is a mobile app designed to help in providing a comfortable reading experience for Muslims, by referencing the book "Hisnul Muslim", and some other references.

Noor App | تطبيق نُور Overview Noor is an islamic mobile app, consists of four main pages: home, favorite, alsabha, and settings. The data is structur

Mais Alheraki 53 Dec 17, 2021
Pig Community Mobile Application

Hello Fellow Pigsters Pig Community Mobile Application Getting Started This project is a starting point for a Flutter application. A few resources to

null 3 May 21, 2021
Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player First Open Source Flutter based Beautiful Material Design Music Player(Online Radio will be added soon.) Demo App Play Store BETA

Pawan Kumar 1.3k Jan 16, 2022
Flutter plugin that allows users to create TextAvatar easily!

Colorize Text Avatar Colorize Text Avatar is a package to generate avatar based on your user initials. It supports to generate avatars based on your s

Deniz Çolak 14 Nov 8, 2021
a project for learning all Flutter Widgets , sync from flutter.dev the officia website.

Flutter Widgets Catalog (WIP) 计划 1、使用Flutter开发一个全平台的Flutter Widgets Catalog APP,并且开源。在这个APP中可以通过图形化的方式查看所有Widgets的介绍,示例,视频教程。 2、所有文档内容由前一天从flutter.dev

ezshine 29 Jan 9, 2022
A low-cost Flutter screen adaptation solution(一个极低成本的 Flutter 屏幕适配方案)

A low-cost Flutter screen adaptation solution(一个极低成本的 Flutter 屏幕适配方案) 100% 还原 UI,只需要按照设计图写的宽高写即可 先看图片,设置的标准宽度是 360 iPhone 8 --------------------------

聂志洋 84 Jan 5, 2022