dreamsoftin / facebook_audience_network

Flutter Facebook Audience Network
https://pub.dartlang.org/packages/facebook_audience_network/
MIT License
154 stars 95 forks source link

"Rejecting attempt to make a View its own child" #61

Open louisifn opened 3 years ago

louisifn commented 3 years ago

Excellent package and have FacebookNativeAd running great on both Android and iOS - However when running on Android - the terminal relentlessly logs:

"Rejecting attempt to make a View its own child"

No error, just this logged.

Widget causing the error:

FacebookNativeAd(
                                placementId: "IMG_16_9_APP_INSTALL#2312433698835503_2964952163583650",
                                adType: NativeAdType.NATIVE_AD,
                                width: double.infinity,
                                height: 250.0,
                                backgroundColor:
                                    Theme.of(context).backgroundColor,
                                titleColor:
                                    Theme.of(context).textTheme.bodyText1.color,
                                descriptionColor:
                                    Theme.of(context).textTheme.bodyText1.color,
                                buttonColor: Theme.of(context).primaryColor,
                                buttonTitleColor:
                                    Theme.of(context).textTheme.headline1.color,
                                buttonBorderColor:
                                    Theme.of(context).primaryColor,
                                listener: (result, value) {
                                  print("Native Ad: $result --> $value");
                                },
                                keepAlive: true,
                                keepExpandedWhileLoading: true,
                                expandAnimationDuraion: 1000,
                              ),

Flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.22.0-2.0.pre.36, on Mac OS X 10.15.6 19G2021, locale en-GB)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.48.1)
[✓] Connected device (2 available)

• No issues found!

Has anyone seen this before?

Omi231 commented 3 years ago

I am facing same issue.

Also are 99% of the time I am nativeads do not respond to touch/clicks as well. Are you experiencing this issue?

louisifn commented 3 years ago

I cannot say I am - the test ads redirect to Facebook within the play store every time. Is this happening for you on the Facebook test adverts?