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

BannerAd doesn't show up on Android (by the default installation process) although intersititial and reward ads show without problem. #158

Closed
sasavas opened this issue May 2, 2020 · 1 comment

Comments

@sasavas
Copy link

sasavas commented May 2, 2020

I followed the installation process as depicted in the wiki and copied the code into the main.dart file.
Everything else works perfectly but banner ad does not show up although it takes space (responsively to the pressing of button "Banner Size".

And here is the output in the debug console:
D/DynamitePackage( 9571): Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/Ads ( 9571): This request is sent from a test device.
W/.savas.expense( 9571): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
W/.savas.expense( 9571): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist,core-platform-api, linking, allowed)
W/.savas.expense( 9571): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
E/MethodChannel#flutter/platform_views( 9571): Failed to handle method call
E/MethodChannel#flutter/platform_views( 9571): android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@ca52fd1 -- the specified display can not be found
E/MethodChannel#flutter/platform_views( 9571): at android.view.ViewRootImpl.setView(ViewRootImpl.java:1069)
E/MethodChannel#flutter/platform_views( 9571): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:397)
E/MethodChannel#flutter/platform_views( 9571): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:108)
E/MethodChannel#flutter/platform_views( 9571): at android.app.Dialog.show(Dialog.java:340)
E/MethodChannel#flutter/platform_views( 9571): at android.app.Presentation.show(Presentation.java:252)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:93)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:53)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:105)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:96)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/MethodChannel#flutter/platform_views( 9571): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/MethodChannel#flutter/platform_views( 9571): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/platform_views( 9571): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#flutter/platform_views( 9571): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#flutter/platform_views( 9571): at android.app.ActivityThread.main(ActivityThread.java:7476)
E/MethodChannel#flutter/platform_views( 9571): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 9571): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
E/MethodChannel#flutter/platform_views( 9571): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:939)
W/.savas.expense( 9571): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist,core-platform-api, linking, allowed)
W/.savas.expense( 9571): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
I/Ads ( 9571): Ad failed to load : 0
E/flutter ( 9571): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Unable to add window android.view.ViewRootImpl$W@ca52fd1 -- the specified display can not be found, null)
E/flutter ( 9571): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:569
E/flutter ( 9571): #1 MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:321
E/flutter ( 9571):
E/flutter ( 9571): #2 AndroidViewController._create
package:flutter/…/services/platform_views.dart:640
E/flutter ( 9571): #3 AndroidViewController.setSize
package:flutter/…/services/platform_views.dart:557
E/flutter ( 9571): #4 RenderAndroidView._sizePlatformView
package:flutter/…/rendering/platform_view.dart:174
E/flutter ( 9571): #5 RenderAndroidView.performResize
package:flutter/…/rendering/platform_view.dart:155
E/flutter ( 9571): #6 RenderObject.layout
package:flutter/…/rendering/object.dart:1703
E/flutter ( 9571): #7 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:105

@sasavas sasavas closed this as completed May 2, 2020
@eagerashwani
Copy link

Can you resolve this issue?
If yes, please guide us🙏

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

2 participants