-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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会导致插件崩溃 #54
Comments
感谢反馈。插件是在单独进程的,这可能是你没看到log的原因。我晚点查这个问题。 |
1 similar comment
感谢反馈。插件是在单独进程的,这可能是你没看到log的原因。我晚点查这个问题。 |
如果你测试使用的是Android 9.0或更高版本系统,应该是下面的原因。否则就是其他我复现不了的问题了。 日志看不到是因为Crash后进程立刻重启了,我们可以在启动插件进程后专门根据pid过滤Log,就能看到插件进程最后几行Log如下:
所以可以看到,这是因为Sample默认打开了严格检查模式,而WebView的实现调用了灰名单方法。所以,应该是Android系统中自己还有一些实现没有避免使用私有API呢。可以去掉 |
我考虑咱们是不是这样改一下? 在宿主程序启动界面加上一个默认为关闭的滑动开关。仅当Android 9.0以上版本显式。开关控制是否调用 虽然不复杂,但是能不能请你帮Shadow写一下这个功能呢?主要目的在于参与共同建设Shadow的代码。 |
嗯 我也发现了如果开启严格模式会导致我手机报错,另外对AppCompat包中使用控件,在宿主的Application中设置AppCompat的theme就可以不报错了。 |
非常感谢!我本地原项目的Shadow化已经基本完成,等测试稳定以后我再提交部分补充。 |
另外的问题最好另外提个issue跟进。最好把代码也传上来。 |
好的,我也是在原项目的改造过程中,逐步摸索、排错。如果发现不是因为我使用问题导致的错误我会提交issue并补充代码的。 |
在插件的测试中对Activity生命周期测试的xml中添加WebView控件会导致插件崩溃且没有有效的错误信息。改动部分代码在本地测试项目在https://github.com/hsynlove/Shadow.git中。
另咨询插件App是独立可运行的,但是作为插件运行中发生的错误有些情况没有日志,请问如何追踪呢。
The text was updated successfully, but these errors were encountered: