Repository navigation
[google_maps_flutter] fatal exception and crash on Android: java.lang.AbstractMethodError #72185
Copy link
Copy link
Closed
Labels
c: fatal crashCrashes that terminate the processCrashes that terminate the processc: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 1.25Found to occur in 1.25Found to occur in 1.25found in release: 1.26Found to occur in 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Description
After upgrading to Flutter (Channel dev, 1.25.0-8.0.pre), when I start google maps (google_maps_flutter: 1.0.6), I have an issuer and crash:
java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onFlutterViewAttached(android.view.View)"
E/AndroidRuntime(21906): at io.flutter.plugin.platform.VirtualDisplayController.onFlutterViewAttached(VirtualDisplayController.java:181)
E/AndroidRuntime(21906): at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:233)
E/AndroidRuntime(21906): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:104)
E/AndroidRuntime(21906): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/AndroidRuntime(21906): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/AndroidRuntime(21906): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/AndroidRuntime(21906): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:738)
E/AndroidRuntime(21906): at android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime(21906): at android.os.MessageQueue.next(MessageQueue.java:326)
E/AndroidRuntime(21906): at android.os.Looper.loop(Looper.java:160)
E/AndroidRuntime(21906): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(21906): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(21906): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(21906): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process (21906): Sending signal. PID: 21906 SIG: 9
Lost connection to device.flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-8.0.pre, on macOS 11.0.1 20B29 darwin-x64, locale ru-RU)
• Flutter version 1.25.0-8.0.pre at
• Framework revision a12e2a473a (3 days ago), 2020-12-08 23:13:04 -0500
• Engine revision df39e5c515
• Dart version 2.12.0 (build 2.12.0-133.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at
• Platform android-30, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.4'
}Note:
Tested
Android 9, Android 10, Android 11 - exception and crash
Android 6 - ok
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: fatal crashCrashes that terminate the processCrashes that terminate the processc: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 1.25Found to occur in 1.25Found to occur in 1.25found in release: 1.26Found to occur in 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Activity
LuisGrt commentedon Dec 12, 2020
I am having the same issue with google_maps_flutter:
flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-8.0.pre, on macOS 11.0.1 20B29 darwin-x64, locale pt-PT) • Flutter version 1.25.0-8.0.pre at /Users/luisgermanrt/Development/flutter • Framework revision a12e2a473a (3 days ago), 2020-12-08 23:13:04 -0500 • Engine revision df39e5c515 • Dart version 2.12.0 (build 2.12.0-133.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/luisgermanrt/Library/Android/sdk • Platform android-30, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.2, Build version 12B45b • CocoaPods version 1.9.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • 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 1.8.0_242-release-1644-b3-6915495) [✓] IntelliJ IDEA Community Edition (version 2020.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 52.0.5 • Dart plugin version 203.5981.152 [✓] VS Code (version 1.52.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0 [✓] Connected device (2 available) • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88 • No issues found!radvansky-tomas commentedon Dec 13, 2020
Same issue
sgehrman commentedon Dec 13, 2020
radvansky-tomas commentedon Dec 13, 2020
Resolved by changing gradle.properties
android.enableDexingArtifactTransform=falserohitkhatri commentedon Dec 13, 2020
I'm also facing the same issue.
rohitkhatri commentedon Dec 13, 2020
It worked for me, thanks.
TahaTesser commentedon Dec 14, 2020
Hey everyone
I can reproduce on
devandmasterchannelss it seems to be working onstableandbetalogs
multiple flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-8.0.pre, on macOS 11.0.1 20B29 darwin-x64, locale en-GB) • Flutter version 1.25.0-8.0.pre at /Users/tahatesser/Code/flutter_dev • Framework revision a12e2a473a (5 days ago), 2020-12-08 23:13:04 -0500 • Engine revision df39e5c515 • Dart version 2.12.0 (build 2.12.0-133.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/tahatesser/Code/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/tahatesser/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.2) • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer • Xcode 12.2, Build version 12B45b • CocoaPods version 1.10.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • 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 1.8.0_242-release-1644-b3-6915495) [!] Android Studio • Android Studio at /Applications/Android/Contents • 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 ✗ Android Studio not found at /Applications/Android/Contents • Try updating or re-installing Android Studio. [✓] VS Code (version 1.52.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.17.0 [✓] Connected device (5 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 10 (API 29) • Taha’s iPad (mobile) • 00008020-000255113EE8402E • ios • iOS 14.2 • iPhone 12 (mobile) • 2188C52E-1D22-45B2-98B8-48401D2B6716 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 11.0.1 20B29 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88 ! Doctor found issues in 1 category.[✓] Flutter (Channel master, 1.25.0-9.0.pre.43, on macOS 11.0.1 20B29 darwin-x64, locale en-GB) • Flutter version 1.25.0-9.0.pre.43 at /Users/tahatesser/Code/flutter_master • Framework revision 63062a6443 (22 hours ago), 2020-12-13 23:19:13 +0800 • Engine revision 4797b06652 • Dart version 2.12.0 (build 2.12.0-141.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/tahatesser/Code/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/tahatesser/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.2) • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer • Xcode 12.2, Build version 12B45b • CocoaPods version 1.10.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • 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 1.8.0_242-release-1644-b3-6915495) [!] Android Studio • Android Studio at /Applications/Android/Contents • 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 ✗ Android Studio not found at /Applications/Android/Contents • Try updating or re-installing Android Studio. [✓] VS Code (version 1.52.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.17.0 [✓] Connected device (5 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 10 (API 29) • Taha’s iPad (mobile) • 00008020-000255113EE8402E • ios • iOS 14.2 • iPhone 12 (mobile) • 2188C52E-1D22-45B2-98B8-48401D2B6716 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator) • macOS (desktop) • macos • darwin-x64 • macOS 11.0.1 20B29 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88 ! Doctor found issues in 1 category.37 remaining items
trane77 commentedon Mar 2, 2021
Thanks @sud0su, it solved the problem both in debug/release mode.
By looking at the sdk share chart, it can be an acceptable solution.
temirfe commentedon Mar 25, 2021
I had to add
-keep class androidx.lifecycle.DefaultLifecycleObserverto the proguard-rules.pro to solve itmavci07 commentedon Apr 13, 2021
I have similar problem like @LuisGrt Anyone solved this error ?
logs
dashu1999 commentedon Apr 23, 2021
Same issue
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Debug service listening on ws://127.0.0.1:59330/JgyhzK4RL0c=/ws
Syncing files to device MI 8 Lite...
I/Process (31780): Sending signal. PID: 31780 SIG: 9
Lost connection to device.
dashu1999 commentedon Apr 23, 2021
it does not work for me
arjinakgul commentedon Apr 28, 2021
It also does not work for me. I think this is a problem that emerged again recently.
TahaTesser commentedon Apr 28, 2021
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of
flutter doctor -v.All system setups can be slightly different, so it's always better to open new issues and reference related issues.
mavci07 commentedon Apr 28, 2021
#81374 @TahaTesser
arjinakgul commentedon Apr 28, 2021
#81375 @TahaTesser
TheAlphaApp commentedon Apr 28, 2021
Yes it is also not working for me.
TheAlphaApp commentedon Apr 28, 2021
when I call interstitial ad to show (package google_mobile_ads : ^0.12.1+1) , this happens;
E/AndroidRuntime(12991): FATAL EXCEPTION: main E/AndroidRuntime(12991): Process: com.app.ssc_x, PID: 12991 E/AndroidRuntime(12991): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd; E/AndroidRuntime(12991): at io.flutter.plugins.googlemobileads.FlutterInterstitialAd.load(FlutterInterstitialAd.java:70) E/AndroidRuntime(12991): at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:299) E/AndroidRuntime(12991): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233) E/AndroidRuntime(12991): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85) E/AndroidRuntime(12991): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818) E/AndroidRuntime(12991): at android.os.MessageQueue.nativePollOnce(Native Method) E/AndroidRuntime(12991): at android.os.MessageQueue.next(MessageQueue.java:336) E/AndroidRuntime(12991): at android.os.Looper.loop(Looper.java:182) E/AndroidRuntime(12991): at android.app.ActivityThread.main(ActivityThread.java:7822) E/AndroidRuntime(12991): at java.lang.reflect.Method.invoke(Native Method)E/AndroidRuntime(12991): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(12991): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026) E/AndroidRuntime(12991): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.InterstitialAd" on path: DexPathList[[zip file "/data/app/com.appdexon.ssc_quixx-tk950NvFRQi0j4L7QbpB3A==/base.apk"],nativeLibraryDirectories=[/data/app/com.appdexon.ssc_quixx-tk950NvFRQi0j4L7QbpB3A==/lib/arm64, /data/app/com.appdexon.ssc_quixx-tk950NvFRQi0j4L7QbpB3A==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]] E/AndroidRuntime(12991): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) E/AndroidRuntime(12991): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) E/AndroidRuntime(12991): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) E/AndroidRuntime(12991): ... 12 more I/Process (12991): Sending signal. PID: 12991 SIG: 9 Lost connection to device.KleinKodes commentedon May 6, 2021
Been having the exact same issue for days now.
github-actions commentedon Aug 2, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.