pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.26k stars 1.6k forks source link

How to handle the combined sliding of webview and native widgets #61

Closed YouCii closed 2 weeks ago

YouCii commented 5 years ago

I want to put a InAppWebView into a Column in SingleChildScrollView, but it cause the page disappear. I use those code to test.

  @override
  Widget childBuild(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: CupertinoNavigationBar(leading: Icon(Icons.arrow_back_ios, color: AppColors.THEME, size: 18)),
      body: SingleChildScrollView(
        child: Column(children: <Widget>[Text("title"), _buildWebView()]),
      ),
    );
  }

  Widget _buildWebView() {
    return Expanded(
      child: InAppWebView(initialUrl: 'https://github.com/pichillilorenzo/flutter_inappbrowser'),
    );
  }

Then I think that as long as I can get the InAppWebView's height, I can solve this problem by wrapping a Container.

Can i get the InAppWebView's height?

YouCii commented 5 years ago

35 There is an same problem here.

YouCii commented 5 years ago

My leadership has again urged the progress of the project. Anyone can help me?

pichillilorenzo commented 5 years ago

did you try to put InAppWebView inside a Container?

  Widget _buildWebView() {
    return Expanded(
      child: Container(
        child: InAppWebView(initialUrl: 'https://github.com/pichillilorenzo/flutter_inappbrowser'),
      )
    );
  }
YouCii commented 5 years ago

Yes, I tried it, but it is the same as before.

Today i am going to try the way of get the height by JS functions and then get the height through JavaScriptHandler. Hope it works,

pichillilorenzo commented 5 years ago

Do you have this problem only on one platform or both Android and iOS?

YouCii commented 5 years ago

The above problem is on Android. When i try it on IOS, the webview is not show at all ( The machine is a iphone XR simulator ) This is the suspicious log.

(Flutter) [VERBOSE-2:platform_view_layer.cc(28)] Trying to embed a platform view but the PaintContext does not support embedding
pichillilorenzo commented 5 years ago

Ok! For iOS, as said on the README.md:

To use InAppWebView class on iOS you need to opt-in for the embedded views preview by adding a boolean property to the app's Info.plist file, with the key io.flutter.embedded_views_preview and the value YES.

YouCii commented 5 years ago

After editing the Info.plist file, WebView is normally displayed on IOS, but it has the same problem as Android.

pichillilorenzo commented 5 years ago

Ok, so maybe it is something related to SingleChildScrollView. If you run my example, does it work?

YouCii commented 5 years ago

The example works well before i do this:

Widget build(BuildContext context) {
    return SingleChildScrollView(...);
}

In fact, SingleChildScrollView is not necessary. I just want to think of the InAppWebView as an item in a list so that it can slide together with other Widgets.

As long as we can achieve this, anything is fine, regardless of SingleChildScrollView.

YouCii commented 5 years ago

I tried to set the height manually like this:

   Container(
      height: _webHeight,
      child: InAppWebView(
        initialData: InAppWebViewInitialData(_newsContentBean.content),
        onWebViewCreated: (InAppWebViewController controller) {
          webViewController = controller;
        },
      ),
    );

But when the height is greater than 5,500, the app crash without any log( Only Android ). When I set the height of an empty container, there is no problem. Maybe because of the memory?

peekpt commented 5 years ago

This problems happens to me. I get the html content chopped or if I set an height will crash at some dimension. I wanted to use this inside a CustomScrollView, I tried everything and there's no way I could get it working. I think it needs its parent to have an height, so it an take that height to render content.

YouCii commented 5 years ago

Steps to Reproduce

  1. I use flutter_inappbrowser: ^0.6.0 to Implement a combined webview.
  2. When I set the webview a height greater than 5500, the app crash. Only Android.
  3. The dart code that caused the error:
    Container(
      height: 6000,
      child: InAppWebView( initialData: InAppWebViewInitialData("<p>asd</p>")  ),
    );
  4. Repeat, only Android.

Logs

[+11444 ms] D/HwCust  ( 9413): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
[   +1 ms] D/HwSensorManager( 9413): HwSensorManager version: 1.0.0
[  +63 ms] I/cr_BrowserStartup( 9413): Initializing chromium process, singleProcess=true
[   +1 ms] W/GooglePlayServicesUtil( 9413): Google Play Store is missing.
[        ] W/GooglePlayServicesUtil( 9413): Google Play Store is missing.
[  +43 ms] W/GooglePlayServicesUtil( 9413): Google Play Store is missing.
[   +2 ms] I/art     ( 9413): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$6>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/RenderProcessGoneDetail;
[        ] I/art     ( 9413):   at com.android.webview.chromium.WebViewContentsClientAdapter com.android.webview.chromium.WebViewChromiumFactoryProvider.createWebViewContentsClientAdapter(android.webkit.WebView, android.content.Context)
(WebViewChromiumFactoryProvider.java:328)
[   +1 ms] I/art     ( 9413):   at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context) (WebView.java:532)
[        ] I/art     ( 9413):   at void com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView.<init>(android.content.Context, java.lang.Object, int, com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebViewOptions) (InAppWebView.java:92)
[        ] I/art     ( 9413):   at void com.pichillilorenzo.flutter_inappbrowser.FlutterWebView.<init>(io.flutter.plugin.common.PluginRegistry$Registrar, int, java.util.HashMap) (FlutterWebView.java:51)
[        ] I/art     ( 9413):   at io.flutter.plugin.platform.PlatformView com.pichillilorenzo.flutter_inappbrowser.FlutterWebViewFactory.create(android.content.Context, int, java.lang.Object) (FlutterWebViewFactory.java:29)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.SingleViewPresentation.onCreate(android.os.Bundle) (SingleViewPresentation.java:130)
[        ] I/art     ( 9413):   at void android.app.Dialog.dispatchOnCreate(android.os.Bundle) (Dialog.java:524)
[        ] I/art     ( 9413):   at void android.app.Dialog.show() (Dialog.java:385)
[        ] I/art     ( 9413):   at void android.app.Presentation.show() (Presentation.java:235)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.VirtualDisplayController.<init>(android.content.Context, android.hardware.display.VirtualDisplay, io.flutter.plugin.platform.PlatformViewFactory, android.view.Surface,
io.flutter.view.TextureRegistry$SurfaceTextureEntry, int, java.lang.Object) (VirtualDisplayController.java:75)
[        ] I/art     ( 9413):   at io.flutter.plugin.platform.VirtualDisplayController io.flutter.plugin.platform.VirtualDisplayController.create(android.content.Context, io.flutter.plugin.platform.PlatformViewFactory,
io.flutter.view.TextureRegistry$SurfaceTextureEntry, int, int, int, java.lang.Object) (VirtualDisplayController.java:47)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.PlatformViewsController.createPlatformView(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (PlatformViewsController.java:179)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.PlatformViewsController.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (PlatformViewsController.java:118)
[        ] I/art     ( 9413):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
[        ] I/art     ( 9413):   at void io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(java.lang.String, byte[], int) (DartMessenger.java:88)
[        ] I/art     ( 9413):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
[        ] I/art     ( 9413):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
[        ] I/art     ( 9413):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:356)
[        ] I/art     ( 9413):   at void android.os.Looper.loop() (Looper.java:138)
[        ] I/art     ( 9413):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6523)
[        ] I/art     ( 9413):   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/art     ( 9413):   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:942)
[        ] I/art     ( 9413):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:832)
[        ] I/art     ( 9413): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file
"/system/app/WebViewGoogle/WebViewGoogle.apk"],nativeLibraryDirectories=[/system/app/WebViewGoogle/lib/arm64, /system/app/WebViewGoogle/WebViewGoogle.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64, /system/lib64,
/vendor/lib64, /system/vendor/lib64, /product/lib64]]
[        ] I/art     ( 9413):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
[        ] I/art     ( 9413):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
[        ] I/art     ( 9413):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
[        ] I/art     ( 9413):   at com.android.webview.chromium.WebViewContentsClientAdapter com.android.webview.chromium.WebViewChromiumFactoryProvider.createWebViewContentsClientAdapter(android.webkit.WebView, android.content.Context)
(WebViewChromiumFactoryProvider.java:328)
[        ] I/art     ( 9413):   at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542)
[        ] I/art     ( 9413):   at void android.webkit.WebView.<init>(android.content.Context) (WebView.java:532)
[        ] I/art     ( 9413):   at void com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView.<init>(android.content.Context, java.lang.Object, int, com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebViewOptions) (InAppWebView.java:92)
[        ] I/art     ( 9413):   at void com.pichillilorenzo.flutter_inappbrowser.FlutterWebView.<init>(io.flutter.plugin.common.PluginRegistry$Registrar, int, java.util.HashMap) (FlutterWebView.java:51)
[        ] I/art     ( 9413):   at io.flutter.plugin.platform.PlatformView com.pichillilorenzo.flutter_inappbrowser.FlutterWebViewFactory.create(android.content.Context, int, java.lang.Object) (FlutterWebViewFactory.java:29)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.SingleViewPresentation.onCreate(android.os.Bundle) (SingleViewPresentation.java:130)
[        ] I/art     ( 9413):   at void android.app.Dialog.dispatchOnCreate(android.os.Bundle) (Dialog.java:524)
[        ] I/art     ( 9413):   at void android.app.Dialog.show() (Dialog.java:385)
[        ] I/art     ( 9413):   at void android.app.Presentation.show() (Presentation.java:235)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.VirtualDisplayController.<init>(android.content.Context, android.hardware.display.VirtualDisplay, io.flutter.plugin.platform.PlatformViewFactory, android.view.Surface,
io.flutter.view.TextureRegistry$SurfaceTextureEntry, int, java.lang.Object) (VirtualDisplayController.java:75)
[        ] I/art     ( 9413):   at io.flutter.plugin.platform.VirtualDisplayController io.flutter.plugin.platform.VirtualDisplayController.create(android.content.Context, io.flutter.plugin.platform.PlatformViewFactory,
io.flutter.view.TextureRegistry$SurfaceTextureEntry, int, int, int, java.lang.Object) (VirtualDisplayController.java:47)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.PlatformViewsController.createPlatformView(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (PlatformViewsController.java:179)
[        ] I/art     ( 9413):   at void io.flutter.plugin.platform.PlatformViewsController.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (PlatformViewsController.java:118)
[   +1 ms] I/art     ( 9413):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:201)
[        ] I/art     ( 9413):   at void io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(java.lang.String, byte[], int) (DartMessenger.java:88)
[        ] I/art     ( 9413):   at void io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(java.lang.String, byte[], int) (FlutterJNI.java:202)
[        ] I/art     ( 9413):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
[        ] I/art     ( 9413):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:356)
[        ] I/art     ( 9413):   at void android.os.Looper.loop() (Looper.java:138)
[        ] I/art     ( 9413):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6523)
[        ] I/art     ( 9413):   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[        ] I/art     ( 9413):   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:942)
[        ] I/art     ( 9413):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:832)
[   +2 ms] I/art     ( 9413): 
[   +7 ms] D/NetworkSecurityConfig( 9413): No Network Security Config specified, using platform default
[   +6 ms] V/AudioManager( 9413): isWiredHeadsetOn...
[   +1 ms] W/cr_media( 9413): Requires BLUETOOTH permission
[   +5 ms] D/HwRTBlurUtils( 9413): check blur style for HwPhoneWindow-, themeResId : 0x0103023e, context : android.app.Presentation$3@7376caa, Nhwext : 0, get Blur : disable with , null
[        ] D/HwRTBlurUtils( 9413): check blur style for HwPhoneWindow-, themeResId : 0x0103023e, context : android.app.Presentation$3@7376caa, Nhwext : 0, get Blur : disable with , null
[        ] I/HwPointEventFilter( 9413): support AFT
[   +3 ms] E/cr_SafeBrowsingApi( 9413): Unable to determine user opt-in preference
[   +8 ms] E/libEGL  ( 9413): validate_display:99 error 3008 (EGL_BAD_DISPLAY)
[  +12 ms] I/art     ( 9413): Background sticky concurrent mark sweep GC freed 12980(1127KB) AllocSpace objects, 8(160KB) LOS objects, 9% free, 16MB/18MB, paused 6.611ms total 23.883ms
[   +5 ms] W/VideoCapabilities( 9413): Unrecognized profile/level 1/32 for video/mp4v-es
[        ] I/VideoCapabilities( 9413): Unsupported profile 16384 for video/mp4v-es
[        ] I/VideoCapabilities( 9413): Unsupported profile 16384 for video/mp4v-es
[   +4 ms] W/VideoCapabilities( 9413): Unsupported mime video/x-pn-realvideo
[        ] W/VideoCapabilities( 9413): Unsupported mime video/mpeg
[        ] W/VideoCapabilities( 9413): Unrecognized profile/level 0/0 for video/mpeg2
[        ] W/VideoCapabilities( 9413): Unrecognized profile/level 0/2 for video/mpeg2
[        ] W/VideoCapabilities( 9413): Unrecognized profile/level 0/3 for video/mpeg2
[        ] W/VideoCapabilities( 9413): Unrecognized profile/level 32768/2 for video/mp4v-es
[   +1 ms] W/VideoCapabilities( 9413): Unsupported mime video/vc1
[   +1 ms] W/VideoCapabilities( 9413): Unsupported mime video/x-flv
[   +7 ms] I/VideoCapabilities( 9413): Unsupported profile 4 for video/mp4v-es
[   +1 ms] W/cr_MediaCodecUtil( 9413): HW encoder for video/avc is not available on this device.
[   +7 ms] D/mali_winsys( 9413): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
[  +33 ms] D/HwuiUseBinaryProgram( 9413): Key: 34359738400 has not found in mBinaryEntries, Compile it.
[ +196 ms] D/HwCust  ( 9413): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
[  +28 ms] D/HwRTBlurUtils( 9413): check blur style for HwPhoneWindow-, themeResId : 0x0103023e, context : android.app.Presentation$3@20a50, Nhwext : 0, get Blur : disable with , null
[        ] D/HwRTBlurUtils( 9413): check blur style for HwPhoneWindow-, themeResId : 0x0103023e, context : android.app.Presentation$3@20a50, Nhwext : 0, get Blur : disable with , null
[   +8 ms] I/HwPointEventFilter( 9413): support AFT
[  +51 ms] D/mali_winsys( 9413): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
[ +275 ms] E/GLConsumer( 9413): [SurfaceTexture-0-9413-0] bindTextureImage: error binding external image: 0x501
[        ] E/flutter ( 9413): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(40)] java.lang.RuntimeException: Error during updateTexImage (see logcat for details)
[        ] E/flutter ( 9413):   at android.graphics.SurfaceTexture.nativeUpdateTexImage(Native Method)
[        ] E/flutter ( 9413):   at android.graphics.SurfaceTexture.updateTexImage(SurfaceTexture.java:240)
[        ] E/flutter ( 9413): 
[        ] F/flutter ( 9413): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(130)] Check failed: CheckException(env). 
[  +71 ms] W/google-breakpad( 9413): ### ### ### ### ### ### ### ### ### ### ### ### ###
[        ] W/google-breakpad( 9413): Chrome build fingerprint:
[        ] W/google-breakpad( 9413): 2.2.2
[        ] W/google-breakpad( 9413): 8
[        ] W/google-breakpad( 9413): ### ### ### ### ### ### ### ### ### ### ### ### ###
[        ] F/libc    ( 9413): Fatal signal 6 (SIGABRT), code -6 in tid 9435 (Thread-7)
[  +88 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[        ] Build fingerprint: 'HUAWEI/NXT-AL10/HWNXT:7.0/HUAWEINXT-AL10/C00B596:user/release-keys'
[        ] Revision: '0'
[        ] ABI: 'arm64'
[        ] pid: 9413, tid: 9435, name: Thread-7  >>> com.cns.ecnsflutter <<<
[        ] signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[   +3 ms] Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(130)] Check failed: CheckException(env). 
[        ] '
[        ]     x0   0000000000000000  x1   00000000000024db  x2   0000000000000006  x3   0000000000000008
[        ]     x4   0000000000000036  x5   0000008000000000  x6   000000705d29a000  x7   0000000000000000
[        ]     x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  0000000000000001
[        ]     x12  ffffffffffffffff  x13  0000000000000000  x14  0000000000000000  x15  000dbcffbd7cbbc4
[        ]     x16  000000705a808ec8  x17  000000705a7b1c28  x18  00000000ebad6082  x19  000000705121a4f8
[        ]     x20  0000000000000006  x21  000000705121a450  x22  0000000000000000  x23  0000007050e97640
[        ]     x24  0000007038b4e680  x25  0000000000000050  x26  0000007050e110a0  x27  000000704e369d58
[        ]     x28  0000000000000001  x29  00000070512184f0  x30  000000705a7af0d0
[        ]     sp   00000070512184d0  pc   000000705a7b1c30  pstate 0000000060000000
[   +8 ms] backtrace:
[        ]     #00 pc 000000000006bc30  /system/lib64/libc.so (tgkill+8)
[        ]     #01 pc 00000000000690cc  /system/lib64/libc.so (pthread_kill+64)
[        ]     #02 pc 0000000000023e68  /system/lib64/libc.so (raise+24)
[        ]     #03 pc 000000000001c8ec  /system/lib64/libc.so (abort+52)
[        ]     #04 pc 0000000000cb8484  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #05 pc 0000000000c98308  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #06 pc 0000000000cb523c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[   +1 ms]     #07 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #08 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #09 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #10 pc 0000000000cb2964  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #11 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #12 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #13 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #14 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #15 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #16 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #17 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #18 pc 0000000000cb3994  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #19 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #20 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #21 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #22 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[   +1 ms]     #23 pc 0000000000cb2e4c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #24 pc 0000000000cb5348  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #25 pc 0000000000cb30e0  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #26 pc 0000000000cb1e00  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #27 pc 0000000000ce2568  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #28 pc 0000000000cb98bc  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #29 pc 0000000000cbb4ac  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #30 pc 0000000000018500  /vendor/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+852)
[        ]     #31 pc 00000000000180fc  /vendor/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+60)
[        ]     #32 pc 0000000000011088  /system/lib64/libandroid.so (ALooper_pollOnce+100)
[        ]     #33 pc 0000000000cbb57c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #34 pc 0000000000cb88bc  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #35 pc 0000000000cb9e3c  /data/app/com.cns.ecnsflutter-2/lib/arm64/libflutter.so (offset 0xc90000)
[        ]     #36 pc 00000000000688d4  /system/lib64/libc.so (_ZL15__pthread_startPv+196)
[        ]     #37 pc 000000000001db00  /system/lib64/libc.so (__start_thread+16)
[ +790 ms] Service protocol connection closed.
[        ] Lost connection to device.
No eroor when analyze flutter.
[✓] Flutter (Channel beta, v1.3.8, on Mac OS X 10.14.3 18D109, locale zh-Hans-CN)
    • Flutter version 1.3.8 at /Users/YouCii/Library/flutter
    • Framework revision e5b1ed7a7f (3 weeks ago), 2019-03-06 14:23:37 -0800
    • Engine revision f4951df193
    • Dart version 2.2.1 (build 2.2.1-dev.0.0 571ea80e11)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/YouCii/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.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_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] Connected device (3 available)
    • MI 6            • 69841c30                             • android-arm64 • Android 8.0.0 (API 26)
    • HUAWEI NXT AL10 • CJL5T16314013688                     • android-arm64 • Android 7.0 (API 24)
    • iPhone XR       • 354279AA-5418-4FD6-9D48-E0C5ECF89E8C • ios           • iOS 12.1 (simulator)

• No issues found!
rolends1986 commented 5 years ago

halo! my solution... image 1,Define JavaScript get dom size 2,Call JavaScript Fun at Dart runtime 3,Change container height

YouCii commented 5 years ago

@rolends1986 Yes, this is my final solution too, but have you ever find that the app running on Android will crash when the height exceeds a certain value ?

rolends1986 commented 5 years ago

@rolends1986 Yes, this is my final solution too, but have you ever find that the app running on Android will crash when the height exceeds a certain value ? @YouCii 你要初始设置一个适合的值,用于在load回调之前,我的htmlHeight初始设置为500

github-actions[bot] commented 2 weeks ago

This issue is stale and has been automatically closed because it has been open for more than 365 days with no activity. Please reopen a new issue if you still have it.

github-actions[bot] commented 8 hours ago

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