Skip to content

java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()" #40126

Closed

Description

@AlexV525

Application will immediately crashed when tap on TextField on Android.

Steps to Reproduce

  1. Place any TextField in State.
  2. Tap on TextField to make it focused.

Logs

E/flutter (16719): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
E/flutter (16719): 	at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
E/flutter (16719): 	at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
E/flutter (16719): 	at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
E/flutter (16719): 	at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
E/flutter (16719): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:120)
E/flutter (16719): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:57)
E/flutter (16719): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/flutter (16719): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/flutter (16719): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/flutter (16719): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (16719): 	at android.os.MessageQueue.next(MessageQueue.java:325)
E/flutter (16719): 	at android.os.Looper.loop(Looper.java:142)
E/flutter (16719): 	at android.app.ActivityThread.main(ActivityThread.java:6798)
E/flutter (16719): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter (16719): 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
E/flutter (16719): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
E/flutter (16719): 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:108)

Here's flutter doctor.

[✓] Flutter (Channel beta, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.5)
[✓] Connected device (2 available)

Activity

  1. dolphinxx commented on Sep 10, 2019

    @dolphinxx

    I also encountered this issue

    E/flutter (28779): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
    E/flutter (28779): 	at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
    E/flutter (28779): 	at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
    E/flutter (28779): 	at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
    E/flutter (28779): 	at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
    E/flutter (28779): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:129)
    E/flutter (28779): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:66)
    E/flutter (28779): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
    E/flutter (28779): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
    E/flutter (28779): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
    E/flutter (28779): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter (28779): 	at android.os.MessageQueue.next(MessageQueue.java:386)
    E/flutter (28779): 	at android.os.Looper.loop(Looper.java:175)
    E/flutter (28779): 	at android.app.ActivityThread.main(ActivityThread.java:7625)
    E/flutter (28779): 	at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (28779): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
    E/flutter (28779): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
    E/flutter (28779): 
    F/flutter (28779): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
    F/libc    (28779): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 28779 (mnread.damnread), pid 28779 (mnread.damnread)
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'HONOR/BND-AL10/HWBND-H:9/HONORBND-AL10/9.1.0.125C00:user/release-keys'
    Revision: '0'
    ABI: 'arm64'
    Happend: 'Tue Sep 10 20:49:49 2019
    '
    SYSVMTYPE: Art
    APPVMTYPE: Art
    pid: 28779, tid: 28779, name: mnread.damnread  >>> com.damnread.damnread <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
    '
        x0  0000000000000000  x1  000000000000706b  x2  0000000000000006  x3  0000000000000008
        x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  7f7f7f7f7f7f7f7f
        x8  0000000000000083  x9  cca45c9c3cab1045  x10 0000000000000000  x11 fffffffc7ffffbdf
        x12 0000000000000001  x13 0000000000000000  x14 ffffff0000000000  x15 0902000000000000
        x16 00000071063b32c0  x17 00000071062f1e34  x18 0000000000000001  x19 000000000000706b
        x20 000000000000706b  x21 0000007ff4f03028  x22 000000705b4b3bd0  x23 0000000000000039
        x24 00000070503271a8  x25 0000007ff4f032c8  x26 0000000000000001  x27 0000000000000001
        x28 0000000000000054  x29 0000007ff4f03010
        sp  0000007ff4f02fd0  lr  00000071062e6960  pc  00000071062e6988
    backtrace:
        #00 pc 0000000000022988  /system/lib64/libc.so (abort+116)
        #01 pc 00000000011d4fa4  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #02 pc 00000000011c70a0  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #03 pc 00000000011c5588  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #04 pc 000000000120ecb0  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #05 pc 00000000011d5960  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #06 pc 00000000011da904  /data/app/com.damnread.damnread-bdwAYEzgic7LPc8Y5mdALQ==/lib/arm64/libflutter.so (offset 0x11c0000)
        #07 pc 00000000000142cc  /system/lib64/libutils.so (android::Looper::pollInner(int)+932)
        #08 pc 0000000000013e8c  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
        #09 pc 000000000012a63c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
        #10 pc 000000000042a35c  /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
        #11 pc 000000000000a620  /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.MessageQueue.next+256)
        #12 pc 000000000056ef88  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #13 pc 00000000000d4204  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #14 pc 0000000000283fa8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
        #15 pc 000000000027dfb0  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
        #16 pc 000000000053ea98  /system/lib64/libart.so (MterpInvokeVirtual+588)
        #17 pc 0000000000561614  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #18 pc 0000000000b4ca1c  /system/framework/boot-framework.vdex (android.os.Looper.loop+142)
        #19 pc 0000000000257cb4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.4019025862+488)
        #20 pc 000000000025d7a8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
        #21 pc 000000000027df94  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
        #22 pc 000000000053ff9c  /system/lib64/libart.so (MterpInvokeStatic+204)
        #23 pc 0000000000561794  /system/lib64/libart.so (ExecuteMterpImpl+14612)
        #24 pc 00000000003de32c  /system/framework/boot-framework.vdex (android.app.ActivityThread.main+428)
        #25 pc 0000000000257cb4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.4019025862+488)
        #26 pc 000000000052aa88  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
        #27 pc 00000000005780fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
        #28 pc 000000000056f24c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
        #29 pc 00000000000d4224  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
        #30 pc 0000000000472fd4  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
        #31 pc 0000000000474a28  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
        #32 pc 00000000004043ac  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
        #33 pc 00000000001456d4  /system/framework/arm64/boot.oat (offset 0x13b000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
        #34 pc 000000000056ef88  /system/lib64/libart.so (art_quick_invoke_stub+584)
        #35 pc 00000000000d4204  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
        #36 pc 0000000000283fa8  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
        #37 pc 000000000027dfb0  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
        #38 pc 000000000053ea98  /system/lib64/libart.so (MterpInvokeVirtual+588)
        #39 pc 0000000000561614  /system/lib64/libart.so (ExecuteMterpImpl+14228)
        #40 pc 000000000122be9c  /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
        #41 pc 0000000000257cb4  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.4019025862+488)
        #42 pc 000000000052aa88  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
        #43 pc 00000000005780fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
        #44 pc 0000000000ee3c0c  /system/framework/arm64/boot-framework.oat (offset 0x415000) (com.android.internal.os.ZygoteInit.main+2540)
        #45 pc 000000000056f24c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
        #46 pc 00000000000d4224  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
        #47 pc 0000000000472fd4  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
        #48 pc 0000000000472c34  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
        #49 pc 0000000000367254  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
        #50 pc 00000000000b9760  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
        #51 pc 00000000000bc4d8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+780)
        #52 pc 0000000000002368  /system/bin/app_process64 (main+1444)
        #53 pc 00000000000ae7e4  /system/lib64/libc.so (__libc_init+88)
    Lost connection to device.
    

    flutter doctor -v:

    [√] Flutter (Channel unknown, v1.9.7, on Microsoft Windows [Version 10.0.18362.329], locale zh-CN)
        • Flutter version 1.9.7 at E:\devtools\flutter
        • Framework revision 4984d1a33d (13 days ago), 2019-08-28 17:04:07 -0700
        • Engine revision f52c0b9270
        • Dart version 2.5.0
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at E:\devtools\android-sdk-windows
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-Q, build-tools 28.0.3
        • Java binary at: E:\devtools\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
        • All Android licenses accepted.
    
    [√] Android Studio (version 3.5)
        • Android Studio at E:\devtools\Android Studio
        • Flutter plugin version 39.0.3
        • Dart plugin version 191.8423
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    
  2. dolphinxx commented on Sep 11, 2019

    @dolphinxx

    I noticed the java.lang.AbstractMethodError throws because an abstract method was invoked, so I simply added empty implements and the error went away.(In my case, the exception throws when the PlatformView resized.)

    Add following methods to the class which implements PlatformView

        @Override
        public void onInputConnectionLocked() {
    
        }
    
        @Override
        public void onInputConnectionUnlocked() {
    
        }
    
  3. AlexV525 commented on Sep 11, 2019

    @AlexV525
    MemberAuthor

    @dolphinxx engine/PlatformView.java
    You mean replace these codes?
    你指的是替换这些代码吗?

    另:个人怀疑仅在国内设备环境出现

  4. dolphinxx commented on Sep 11, 2019

    @dolphinxx

    @dolphinxx engine/PlatformView.java
    You mean replace these codes?
    你指的是替换这些代码吗?

    另:个人怀疑仅在国内设备环境出现

    找到你的代码中实现了PlatformView接口的类,在那个类里加入

        @Override
        public void onInputConnectionLocked() {
    
        }
    
        @Override
        public void onInputConnectionUnlocked() {
    
        }
    
  5. AlexV525 commented on Sep 11, 2019

    @AlexV525
    MemberAuthor

    @dolphinxx 根据你的解答,找到了flutter_inappbrowser中的实现,添加后已解决,非常感谢!

    This issue seems related to packages which has been implement with PlatformView, such as flutter_inappbrowser in my case.
    I'll create a new issue about it, but the answer that @dolphinxx provides can help others to solve this problem.

  6. maqoo commented on Sep 11, 2019

    @maqoo

    I am experiencing this error with web view component (webview_flutter package). We are displaying a map and when changing views size this happens.

  7. AlexV525 commented on Sep 11, 2019

    @AlexV525
    MemberAuthor

    I am experiencing this error with web view component (webview_flutter package). We are displaying a map and when changing views size this happens.

    Same as webview_flutter, those functions hasn't been override until now, and there's a TODO in webview_flutter to implement this but it never lands.

  8. sunil90210 commented on Sep 11, 2019

    @sunil90210

    I'm facing this error with google_maps_flutter, when TextField is focused. Issue is there on stable branch(v1.9.1+hotfix.2).

    I downgraded to v1.7.8+hotfix.4 to get this working, using below commands:

    flutter version v1.7.8+hotfix.4
    flutter doctor
    [✓] Flutter (Channel unknown, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G95, locale en-GB)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    [✓] iOS tools - develop for iOS devices
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 3.5)
    [✓] VS Code (version 1.38.0)
    [✓] Connected device (2 available)
    
  9. rlechetaudemy commented on Sep 11, 2019

    @rlechetaudemy

    Same error here. To reproduce the error just add some Map widget and call showSearch method.

    google_maps_flutter: ^0.5.21

    I/art     (12632): Do partial code cache collection, code=30KB, data=28KB
    I/art     (12632): After code cache collection, code=25KB, data=25KB
    I/art     (12632): Increasing code cache capacity to 128KB
    D/        (12632): HostConnection::get() New Host Connection established 0xa9132e80, tid 12646
    I/art     (12632): Background partial concurrent mark sweep GC freed 3455(114KB) AllocSpace objects, 10(6MB) LOS objects, 10% free, 35MB/39MB, paused 7.100ms total 73.684ms
    I/art     (12632): Background sticky concurrent mark sweep GC freed 1098(31KB) AllocSpace objects, 1(884KB) LOS objects, 0% free, 39MB/39MB, paused 5.127ms total 31.084ms
    I/art     (12632): Background sticky concurrent mark sweep GC freed 12613(317KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 41MB/41MB, paused 12.295ms total 77.211ms
    W/DynamiteModule(12632): Local module descriptor class for com.google.android.gms.googlecertificates not found.
    I/DynamiteModule(12632): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4
    I/DynamiteModule(12632): Selected remote version of com.google.android.gms.googlecertificates, version >= 4
    I/art     (12632): Background partial concurrent mark sweep GC freed 3853(135KB) AllocSpace objects, 13(3MB) LOS objects, 8% free, 44MB/48MB, paused 10.146ms total 103.281ms
    I/art     (12632): Background sticky concurrent mark sweep GC freed 747(21KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 48MB/48MB, paused 5.413ms total 21.123ms
    W/System  (12632): ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/00000024/n/x86
    I/art     (12632): Background partial concurrent mark sweep GC freed 6057(160KB) AllocSpace objects, 5(16MB) LOS objects, 10% free, 32MB/36MB, paused 5.539ms total 68.973ms
    I/art     (12632): Background sticky concurrent mark sweep GC freed 43858(1287KB) AllocSpace objects, 0(0B) LOS objects, 1% free, 35MB/36MB, paused 7.892ms total 68.257ms
    E/flutter (12632): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
    E/flutter (12632): 	at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
    E/flutter (12632): 	at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
    E/flutter (12632): 	at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
    E/flutter (12632): 	at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
    E/flutter (12632): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:129)
    E/flutter (12632): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:66)
    E/flutter (12632): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
    E/flutter (12632): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
    E/flutter (12632): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:645)
    E/flutter (12632): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    E/flutter (12632): 	at android.os.MessageQueue.next(MessageQueue.java:323)
    E/flutter (12632): 	at android.os.Looper.loop(Looper.java:136)
    E/flutter (12632): 	at android.app.ActivityThread.main(ActivityThread.java:6119)
    E/flutter (12632): 	at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (12632): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    E/flutter (12632): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    E/flutter (12632):
    F/flutter (12632): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
    F/libc    (12632): Fatal signal 6 (SIGABRT), code -6 in tid 12632 (pasto.adama.com)
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'google/sdk_google_phone_x86/generic_x86:7.1.1/NYC/4316688:user/release-keys'
    Revision: '0'
    ABI: 'x86'
    pid: 12632, tid: 12632, name: pasto.adama.com  >>> pasto.adama.com <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
    '
        eax 00000000  ebx 00003158  ecx 00003158  edx 00000006
        esi b5eab58c  edi b5eab534
        xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
        eip b5dd7424  ebp bf90adc8  esp bf90ad6c  flags 00200296
    backtrace:
        #00 pc ffffe424  [vdso:b5dd7000] (__kernel_vsyscall+16)
        #01 pc 0007a03c  /system/lib/libc.so (tgkill+28)
        #02 pc 00075885  /system/lib/libc.so (pthread_kill+85)
        #03 pc 0002785a  /system/lib/libc.so (raise+42)
        #04 pc 0001ee36  /system/lib/libc.so (abort+86)
        #05 pc 011104d5  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #06 pc 010fe5a1  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #07 pc 010fc344  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #08 pc 0115e4a9  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #09 pc 0110ec51  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #10 pc 011112bb  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #11 pc 01111200  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #12 pc 01117908  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #13 pc 01117936  /data/app/pasto.adama.com-2/lib/x86/libflutter.so (offset 0x10f5000)
        #14 pc 00018360  /system/lib/libutils.so (_ZN7android20SimpleLooperCallback11handleEventEiiPv+48)
        #15 pc 00019307  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+1207)
        #16 pc 00018d84  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+68)
        #17 pc 000d43b3  /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+77)
        #18 pc 000d4424  /system/lib/libandroid_runtime.so
        #19 pc 01d36f7c  /system/framework/x86/boot-framework.oat (offset 0x1585000) (android.os.MessageQueue.nativePollOnce+136)
        #20 pc 01d38b33  /system/framework/x86/boot-framework.oat (offset 0x1585000) (android.os.MessageQueue.next+223)
        #21 pc 01d32efa  /system/framework/x86/boot-framework.oat (offset 0x1585000) (android.os.Looper.loop+342)
        #22 pc 0162c365  /system/framework/x86/boot-framework.oat (offset 0x1585000) (android.app.ActivityThread.main+401)
        #23 pc 00109432  /system/lib/libart.so (art_quick_invoke_static_stub+418)
        #24 pc 00112de9  /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+313)
        #25 pc 005105d5  /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+101)
        #26 pc 00512514  /system/lib/libart.so (_ZN3art12InvokeMethodERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectS4_S4_j+1540)
        #27 pc 00469530  /system/lib/libart.so (_ZN3artL13Method_invokeEP7_JNIEnvP8_jobjectS3_S3_+96)
        #28 pc 005deb9c  /system/framework/x86/boot.oat (offset 0x520000) (java.lang.reflect.Method.invoke+168)
        #29 pc 02381820  /system/framework/x86/boot-framework.oat (offset 0x1585000) (com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run+124)
        #30 pc 0238286e  /system/framework/x86/boot-framework.oat (offset 0x1585000) (com.android.internal.os.ZygoteInit.main+1274)
        #31 pc 00109432  /system/lib/libart.so (art_quick_invoke_static_stub+418)
        #32 pc 00112de9  /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+313)
        #33 pc 005105d5  /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+101)
        #34 pc 00510299  /system/lib/libart.so (_ZN3art17InvokeWithVarArgsERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDPc+393)
        #35 pc 003f807e  /system/lib/libart.so (_ZN3art3JNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDPc+958)
        #36 pc 001417d1  /system/lib/libart.so (_ZN3art8CheckJNI11CallMethodVEPKcP7_JNIEnvP8_jobjectP7_jclassP10_jmethodIDPcNS_9Primitive4TypeENS_10InvokeTypeE+4513)
        #37 pc 00132f8c  /system/lib/libart.so (_ZN3art8CheckJNI21CallStaticVoidMethodVEP7_JNIEnvP7_jclassP10_jmethodIDPc+108)
        #38 pc 00070ad1  /system/lib/libandroid_runtime.so (_ZN7_JNIEnv20CallStaticVoidMethodEP7_jclassP10_jmethodIDz+41)
        #39 pc 0007438e  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime5startEPKcRKNS_6VectorINS_7String8EEEb+782)
        #40 pc 00001b55  /system/bin/app_process32
        #41 pc 0001532c  /system/lib/libc.so (__libc_init+108)
        #42 pc 0000144c  /system/bin/app_process32
        #43 pc 00000004  <unknown>
    Lost connection to device.
    
    2019-09-11 09:55:21.071 10055-10055/pasto.adama.com E/flutter: [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
            at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
            at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
            at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
            at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
            at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:129)
            at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:66)
            at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
            at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
            at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:645)
            at android.os.MessageQueue.nativePollOnce(Native Method)
            at android.os.MessageQueue.next(MessageQueue.java:323)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:6119)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    2019-09-11 09:55:21.071 10055-10055/pasto.adama.com A/flutter: [FATAL:flutter/shell/platform
    /android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
    
    • Flutter Doctor
    flutter channel
    Flutter channels:
      beta
      dev
    * master
      stable
    
    flutter doctor -v
    [✓] Flutter (Channel master, v1.10.2-pre.27, on Mac OS X 10.14.6 18G87, locale en-BR)
        • Flutter version 1.10.2-pre.27 at /Users/rlecheta/flutter
        • Framework revision f7d86a5b79 (14 hours ago), 2019-09-10 16:03:17 -0700
        • Engine revision 7ea9884ab0
        • Dart version 2.5.0 (build 2.5.0-dev.4.0 be66176534)
    
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
        • Android SDK at /Users/rlecheta/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-29, build-tools 29.0.0
        • ANDROID_HOME = /Users/rlecheta/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 10.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 10.3, Build version 10G8
        • CocoaPods version 1.7.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 3.5)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 39.0.3
        • Dart plugin version 191.8423
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2019.1)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        • Flutter plugin version 35.2.2
        • Dart plugin version 191.6183.88
    
    [✓] IntelliJ IDEA Community Edition (version 2019.1)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 35.2.2
        • Dart plugin version 191.6183.88
    
    [✓] VS Code (version 1.38.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.4.1
    
    [✓] Connected device (3 available)
        • Android SDK built for x86             • emulator-5554                        • android-x86    • Android 7.1.1 (API 25) (emulator)
        • iPad Pro (12.9-inch) (3rd generation) • 56B998B6-50F1-4C4E-B6FC-74D570ABD7FF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
        • Chrome                                • chrome                               • web-javascript • Google Chrome 76.0.3809.132
    
    
    • No issues found!
    
    import 'dart:async';
    import 'package:flutter/material.dart';
    import 'package:google_maps_flutter/google_maps_flutter.dart';
    
    class MapaBugPage extends StatefulWidget {
      @override
      _MapaRevendasPageState createState() => _MapaRevendasPageState();
    }
    
    class _MapaRevendasPageState extends State<MapaBugPage>
        with TickerProviderStateMixin {
      Completer<GoogleMapController> _controller = Completer();
    
      @override
      void initState() {
        super.initState();
      }
    
      @protected
      void onMapCreated(GoogleMapController controller) async {
        _controller.complete(controller);
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            backgroundColor: Colors.white,
            title: Text(
              "Map Bug 2",
            ),
            actions: [
              IconButton(
                icon: Icon(Icons.search),
                onPressed: _onClickSearch,
              )
            ],
          ),
          body: Container(
            child: GoogleMap(
              mapType: MapType.normal,
              myLocationEnabled: true,
              myLocationButtonEnabled: true,
              zoomGesturesEnabled: true,
              onMapCreated: onMapCreated,
              initialCameraPosition:
              CameraPosition(target: LatLng(-8.628117, -55.377721), zoom: 4),
            ),
          ),
        );
      }
    
      void _onClickSearch() async {
        try {
          dynamic obj = await showSearch(
            context: context,
            delegate: BasicSearch(),
          );
          print(obj);
        } catch (e) {
          print(e);
        }
      }
    }
    
    class BasicSearch extends SearchDelegate {
      @override
      List<Widget> buildActions(BuildContext context) {
        // TODO: implement buildActions
        return null;
      }
    
      @override
      Widget buildLeading(BuildContext context) {
        // TODO: implement buildLeading
        return null;
      }
    
      @override
      Widget buildResults(BuildContext context) {
        // TODO: implement buildResults
        return null;
      }
      @override
      Widget buildSuggestions(BuildContext context) {
        // TODO: implement buildSuggestions
        return null;
      }
    }
  10. iamstuffed commented on Sep 12, 2019

    @iamstuffed

    https://github.com/flutter/engine/blob/master/shell/platform/android/io/flutter/plugin/platform/PlatformView.java

    Default method implementations in interfaces are only supported on Android >= API 24 (Java 8 feature). If you set the app's min sdk to 24, the crashes will probably go away. If your min sdk version is < 24, you'll probably get crashes due to lack of default method implementation support in interfaces.

  11. iamstuffed commented on Sep 12, 2019

    @iamstuffed

    https://developer.android.com/studio/write/java8-support
    Min sdk shouldn't matter, according that page.

  12. exgonline commented on Sep 12, 2019

    @exgonline

    Updating the Min SDK to 24 worked for me :-)

  13. lanrehnics commented on Sep 16, 2019

    @lanrehnics

    Updating the Min SDK to 24 worked for me :-)

    This works but, I really need to set my min SDK to 16 whats the solution for that ..

  14. 24 remaining items

  15. fauzipadlaw commented on Sep 23, 2019

    @fauzipadlaw

    @blasten it didn't fix the issue

  16. audkar commented on Sep 23, 2019

    @audkar

    @mklim I made 100% reproducible project
    Steps I make to reproduce:

    1. Run application on android 10 emulator. (soft keyboard should open on app start).
    2. Press goNext button (without closing keyboard)
    3. App should crash
  17. mklim commented on Sep 23, 2019

    @mklim
    Contributor

    @audkar Thank you! That reproduces it for me too.

  18. mklim commented on Sep 23, 2019

    @mklim
    Contributor

    The root problem appears to be the same as https://issuetracker.google.com/139821726, and not anything to do with Java 1.8 or Proguard like I theorized earlier. Sorry for the confusion. It's actually that the most recent version of Gradle has some extra dexing that has gone wrong in this case because it's not aware that the Flutter app needs to ever use that method in the engine.

    Any users who want to stay on Gradle 3.5.0 and fix this should be able to work around this by adding android.enableDexingArtifactTransform=false to their gradle.properties file. I tested this fix out locally and did see it working. Alternatively this can also be worked around by downgrading to Gradle 3.4x.

    @blasten I found a comment from a Gradle developer explaining that this happens when Gradle doesn't have POM information about our dependencies here. This seems like something we should try to fix in the wider Flutter build structure, what do you think?

  19. blasten commented on Sep 25, 2019

    @blasten

    @audkar would you mind including this file https://github.com/flutter/flutter/blob/master/LICENSE in https://github.com/audkar/flutter_abstract_method_issue. I'd like to use your same repro, but I realized that it doesn't have a license.

  20. audkar commented on Sep 25, 2019

    @audkar

    I'm away from my computer. Can't do any advanced work today :) I added default MIT license. Is it ok? @blasten

  21. blasten commented on Sep 25, 2019

    @blasten

    that should be fine. Thank you!

  22. rtugeek commented on Mar 10, 2020

    @rtugeek

    I am using Mapbox. facing the same issue.
    When TextField is focusing, the keyboard popup up and Scaffold trigger AndroidView resize, then the error occurs.
    I fixed this by adding two lines for Scaffold.

    Scaffold(
          resizeToAvoidBottomInset: false,
          resizeToAvoidBottomPadding: false,
    ...
    

    But this will cause side effects: the keyboard will block the widget in the bottom inset. take seriously if you want to use it.

  23. lock commented on Apr 5, 2020

    @lock

    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 -v and a minimal reproduction of the issue.

  24. locked and limited conversation to collaborators on Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: platform-viewsEmbedding Android/iOS views in Flutter appsa: text inputEntering text in a text field or keyboard related problemsc: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowengineflutter/engine related. See also e: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions