Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always crash #451

Open
alex9153 opened this issue Jun 29, 2022 · 0 comments
Open

Always crash #451

alex9153 opened this issue Jun 29, 2022 · 0 comments

Comments

@alex9153
Copy link

alex9153 commented Jun 29, 2022

Fatal Exception: java.lang.IncompatibleClassChangeError
The method 'java.lang.Class java.lang.Object.getClass()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'com.google.android.gms.dynamic.ObjectWrapper' appears in /data/app/com.app.braintris.ab-2/base.apk)
com.google.android.gms.dynamic.ObjectWrapper.unwrap (com.google.android.gms:play-services-basement@@18.0.2:4)

com.google.android.gms.ads.BaseAdView.loadAd (com.google.android.gms:play-services-ads-lite@@21.0.0:5)
io.flutter.plugins.googlemobileads.FlutterBannerAd.load (FlutterBannerAd.java:67)
io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall (GoogleMobileAdsPlugin.java:386)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:262)
io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:295)
io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0 (DartMessenger.java:319)
io.flutter.embedding.engine.dart.DartMessenger.$r8$lambda$TsixYUB5E6FpKhMtCSQVHKE89gQ (DartMessenger.java)
io.flutter.embedding.engine.dart.DartMessenger$$InternalSyntheticLambda$0$ceffc6bae7d364cb48afaf1aaebd60bf9050360d0efb9035ebc54f0851df0a05$0.run (DartMessenger.java)

every 30 seconds I call this code

                                 _banner?.dispose();
				_banner = BannerAd(
					adUnitId: AdsManager.idGoogleBanner,
					size: AdSize.banner,
					request: AdRequest(),
					listener: BannerAdListener(
						onAdLoaded: (ad) {
							_ad?.dispose();
							_ad = ad;
							reloadWidget();
						},
						onAdFailedToLoad: (ad, e) {
							_ad?.dispose();
							_ad = null;
							reloadWidget();
						}
					),
				);
				_banner.load();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant