duyduong / flutter_native_admob

Plugin to integrate native firebase admob to Flutter application
MIT License
62 stars 85 forks source link

Fatal exception and Crash on Android #78

Open amitash opened 3 years ago

amitash commented 3 years ago

After upgrading to flutter 1.25.0-8.1.pre, app crashes on start-up as soon as the Ads start to load. The error is similar to one reported on the flutter community at https://github.com/flutter/flutter/issues/72185.

java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onFlutterViewAttached(android.view.View)"

The temporary fix for this is to set android.enableDexingArtifactTransform=false in gradle.properties.

on iOS, this issue is absent.

diegoflassa commented 3 years ago

Same issue. Will try the android.enableDexingArtifactTransform=false fix

It worked!!

bartonhammond commented 3 years ago

Same issue. I added android.enableDexingArtifactTransform=false and now I can see the ads on Android (thanks! @amitash )

I am seeing this stacktrace. The ad appears fine and I can click it successfully. Not sure what it means.

W/ConnectionTracker(17043): Exception thrown while unbinding
W/ConnectionTracker(17043): java.lang.IllegalArgumentException: Service not registered: lu@6bfdddf
W/ConnectionTracker(17043):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1751)
W/ConnectionTracker(17043):     at android.app.ContextImpl.unbindService(ContextImpl.java:1776)
W/ConnectionTracker(17043):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:741)
W/ConnectionTracker(17043):     at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):1)
W/ConnectionTracker(17043):     at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):2)
W/ConnectionTracker(17043):     at lv.E(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):9)
W/ConnectionTracker(17043):     at lf.a(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):3)
W/ConnectionTracker(17043):     at ef.run(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):3)
W/ConnectionTracker(17043):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
W/ConnectionTracker(17043):     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/ConnectionTracker(17043):     at iy.run(:com.google.android.gms.dynamite_measurementdynamite@204516084@20.45.16 (120700-0):5)
keeliu07 commented 3 years ago

same issue. Fixed by adding android.enableDexingArtifactTransform=false Thanks!