bdlukaa / native_admob_flutter

Easy-to-make native ads in flutter using AdMOB SDK.
https://pub.dev/packages/native_admob_flutter
BSD 3-Clause "New" or "Revised" License
80 stars 56 forks source link

MobileAds.initialize issue #115

Open krimster opened 2 years ago

krimster commented 2 years ago

Hi There

I'm seeing an issue whereby my app never goes past the MobileAds.initialize line, so the app never loads hence it's stuck on the splash screen. I suspect it is due to the issue below.

https://github.com/googleads/googleads-mobile-flutter/issues/429

lucassampaio-pixelwolf commented 2 years ago

@krimster same thing happening with me.

I do not know Kotlin, but I changed the native code from this:

MobileAds.initialize(activity) { result.success(Build.VERSION.SDK_INT) }

To this:

                try {
                    MobileAds.initialize(activity)
                } catch (e: Exception) {
                    // error
                } finally {
                    result.success(Build.VERSION.SDK_INT)
                }

And it works for now. But it is not a good solution.

izzetemredemir commented 2 years ago

The same problem my app crashed all instances. I had to update.

It only initialize with test app id

  <meta-data            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713"/>
DholaSain commented 2 years ago

I had published my 2 Apps on Playstore with this package & they were working fine and eventually, both of them stopped working & stuck on splash screen. WTH 😭😡