Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果添加webview_flutter这个包运行会出现异常 #323

Closed
GanZhiXiong opened this issue Mar 23, 2019 · 5 comments
Closed

如果添加webview_flutter这个包运行会出现异常 #323

GanZhiXiong opened this issue Mar 23, 2019 · 5 comments

Comments

@GanZhiXiong
Copy link

异常为:
[VERBOSE-3:FlutterPlatformViews.mm(152)] Check failed: factories_.count(idString) == 0.

@CarGuo
Copy link
Owner

CarGuo commented Mar 23, 2019

webview_flutter 已经源码内置了

@GanZhiXiong
Copy link
Author

我将最新的webview_flutter: ^0.3.5+2源码内置,可以打开网页,但是无法使用它更新的回调,如navigationDelegate、onPageFinished,虽然不会报错,但是回调不会执行。我新建一个项目通过在pubspec.yaml文件中声明,同样的代码这些回调是可以调用的

@GanZhiXiong
Copy link
Author

image
这些回调都不会执行,是不是只源码内置是不够的呀

@GanZhiXiong
Copy link
Author

GanZhiXiong commented Mar 24, 2019

我觉得还是得从pub引入webview_flutter这个包出现如下异常入手
[VERBOSE-3:FlutterPlatformViews.mm(152)] Check failed: factories_.count(idString) == 0.

我新建一个项目,在pubspec.yaml文件中声明,运行后是不会出现这个异常的,所以应该项目可能修改某些关键配置导致的吧

@GanZhiXiong
Copy link
Author

通过xcode调试我已经解决了这个问题,调试发现是如下图所示的注释的代码导致的报错,于是我将其注释,运行通过,onPageFinished也能回调了。

如下图红框中的四个文件我也不知道是怎么来的,正常pub中声明这个包,是不会出现这四个文件的。

image

@CarGuo CarGuo closed this as completed Apr 28, 2019
@CarGuo CarGuo mentioned this issue Nov 21, 2019
@hzg1105 hzg1105 mentioned this issue Jun 14, 2020
@wangkr wangkr mentioned this issue Jul 4, 2020
@jayVRIY jayVRIY mentioned this issue Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants