Closed ash-hashtag closed 1 year ago
Hi @ash-hashtag Please try running google_mobile_ads sample code and check if there is a crash.
If the crash still persists, please provide the output of flutter run -v
along with the affected device info. Thanks!
thanks, I don't know what exactly was the problem, but It fixed when I re implemented with the given example
I don't understand when or why it broke, I implemented native ads in my app 2 months ago and they were perfect, and I was like I'm done with ads, and never messed with them, the app is still in development, and now very soon will be published, I've tried to see is everything working fine, and the ads are now broke, tried with banner ads, seems fine, but we want only native ads, could anyone provide me with boilerplate/example of a working native ad implementation, with this package. We want to go public as soon as possible.. Thanks
Plugin Version
google_mobile_ads: ^2.0.0
Steps to Reproduce
native_ad_layout.xml
NativeAdFactory.kt
MainActivity.kt
native_ad.dart
Expected results: able to display native ads
Actual results: app crashing
Logs
Logs from the moment, calling ad.load(), and then crashes. ``` E/AndroidRuntime(28245): at android.os.Binder.transact(Binder.java:1067) E/AndroidRuntime(28245): at aet.be(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:2) E/AndroidRuntime(28245): at com.google.android.gms.ads.internal.formats.client.al.e(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:0) E/AndroidRuntime(28245): at com.google.android.gms.ads.nonagon.ad.nativead.af.run(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:5) E/AndroidRuntime(28245): at android.os.Handler.handleCallback(Handler.java:938) E/AndroidRuntime(28245): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(28245): at asd.a(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:0) E/AndroidRuntime(28245): at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:1) E/AndroidRuntime(28245): at asd.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@223712200@223712200057.473771314.473771314:0) E/AndroidRuntime(28245): at android.os.Looper.loopOnce(Looper.java:210) E/AndroidRuntime(28245): at android.os.Looper.loop(Looper.java:299) E/AndroidRuntime(28245): at android.app.ActivityThread.main(ActivityThread.java:8298) E/AndroidRuntime(28245): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(28245): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576) E/AndroidRuntime(28245): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073) Lost connection to device. ``` ``` ``` ``` [√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 10.0.22623.891], locale en-IN) • Flutter version 3.3.8 on channel stable at C:\src\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 52b3dc25f6 (2 weeks ago), 2022-11-09 12:09:26 +0800 • Engine revision 857bd6b74c • Dart version 2.18.4 • DevTools version 2.15.0 [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at C:\Users\SPT\AppData\Local\Android\sdk • Platform android-33, build-tools 32.1.0-rc1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.4.33110.190 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2021.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.13+0-b1751.21-8125866) [√] VS Code (version 1.73.1) • VS Code at C:\Users\SPT\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.52.0 [√] Connected device (3 available) • M2101K7BI (mobile) • X84LCAF6QS85KZAE • android-arm64 • Android 12 (API 31) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22623.891] • Edge (web) • edge • web-javascript • Microsoft Edge 107.0.1418.42 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category. ```