颤动:通过USB安装应用程序时,Webview运行正常,但通过Google Play安装时,Webview运行不正常

时间:2019-08-21 11:47:36

标签: flutter webview

我的应用使用网络视图显示我的条款和条件。我利用“ webview_flutter”包来做到这一点。当我通过“ flutter run --release”安装我的应用程序时,一切正常,并且我的网站已完美加载。当我将我的应用提交到生产模式的Google Play时,尝试打开W​​ebview时出现错误。知道什么会导致该错误吗?

我仔细检查了几乎所有内容。仅通过Google Play在我的Android设备上安装时会发生错误,但通过USB电缆安装时一切正常。

WebView(initialUrl: 'https://xyz.abc/terms')

Expected: Webview should load
Error instead:
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'int ja
va.lang.Integer.intValue()' on a null object reference, null)
E/flutter (31498): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564)
E/flutter (31498): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316)
E/flutter (31498): <asynchronous suspension>
E/flutter (31498): #2      AndroidViewController._create (package:flutter/src/services/platform_views.dart:639)
E/flutter (31498): <asynchronous suspension>
E/flutter (31498): #3      AndroidViewController.setSize (package:flutter/src/services/platform_views.dart:556)
E/flutter (31498): <asynchronous suspension>
E/flutter (31498): #4      RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:189)
E/flutter (31498): <asynchronous suspension>
E/flutter (31498): #5      RenderAndroidView.performResize (package:flutter/src/rendering/platform_view.dart:170)
E/flutter (31498): #6      RenderObject.layout (package:flutter/src/rendering/object.dart:1604)
E/flutter (31498): #7      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy
_box.dart:105)
E/flutter (31498): #8      RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #9      RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:805)
E/flutter (31498): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #11     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206)
E/flutter (31498): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #13     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy
_box.dart:105)
E/flutter (31498): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #15     RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:259)
E/flutter (31498): #16     RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #17     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206)
E/flutter (31498): #18     RenderObject.layout (package:flutter/src/rendering/object.dart:1619)
E/flutter (31498): #19     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510)
E/flutter (31498): #20     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1496)
E/flutter (31498): #21     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:765)
E/flutter (31498): #22     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&Rendere
rBinding.drawFrame (package:flutter/src/rendering/binding.dart:346)
E/flutter (31498): #23     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&Rendere
rBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:701)
E/flutter (31498): #24     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&Rendere
rBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:285)
E/flutter (31498): #25     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/sr
c/scheduler/binding.dart:1016)
E/flutter (31498): #26     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/sch
eduler/binding.dart:958)
E/flutter (31498): #27     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/sc
heduler/binding.dart:874)
E/flutter (31498): #28     _rootRun (dart:async/zone.dart:1124)
E/flutter (31498): #29     _CustomZone.run (dart:async/zone.dart:1021)
E/flutter (31498): #30     _CustomZone.runGuarded (dart:async/zone.dart:923)
E/flutter (31498): #31     _invoke (dart:ui/hooks.dart:236)
E/flutter (31498): #32     _drawFrame (dart:ui/hooks.dart:194)

0 个答案:

没有答案