安卓:这是什么警告信息是指什么? - (WebCore的) [英] Android: What does this warning message refer to? - (WebCore)

查看:146
本文介绍了安卓:这是什么警告信息是指什么? - (WebCore的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含的WebView的是它的孩子,画廊,当我滚动图库我得到以下警告,

I have a Gallery which contains WebView's as its children, when I scroll the Gallery I am getting the following warning,

'04-07 19:35:37.409: WARN/webcore(664): Can't get the viewWidth after the first layout
 04-07 19:35:37.470: WARN/webcore(664): skip viewSizeChanged as w is 0'

这是什么警告指什么? [我没有硬codeD任何布局PARAMS的。]

What does this warning refer to ? [I have not hardcoded any of the Layout params.]

为什么这个警告发生的任何光线将是真正的帮助...

Any light on why this warning occurs would be really helpful...

和这些被印制太

04-15 11:10:13.202: DEBUG/webviewglue(617): nativeDestroy view: 0x257f40
04-15 11:10:13.243: DEBUG/webviewglue(617): nativeDestroy view: 0x25d680
04-15 11:10:13.292: DEBUG/webviewglue(617): nativeDestroy view: 0x240688
04-15 11:10:13.332: DEBUG/webviewglue(617): nativeDestroy view: 0x249918
04-15 11:10:13.373: DEBUG/webviewglue(617): nativeDestroy view: 0x226608
04-15 11:10:13.423: DEBUG/webviewglue(617): nativeDestroy view: 0x21e418
04-15 11:10:13.482: DEBUG/webviewglue(617): nativeDestroy view: 0x23a4e8
04-15 11:10:13.533: DEBUG/webviewglue(617): nativeDestroy view: 0x235c68
04-15 11:10:13.572: DEBUG/webviewglue(617): nativeDestroy view: 0x212a28

在此先感谢。

Thanks in advance.

推荐答案

我有同样的问题,我的正常的WebView是行不通的,给了我为你描述了同样的错误。

I've had the same problem my normal webview wouldn't work and gave me the same error as you have described.

skip viewSizeChanged as w is 0

据我了解,这已使用Android变焦其中较新的设备允许以避免应用(专为手机)出现在例如为小窗口应用程序片。

As I understand it this has to do with Android zoom which newer devices allows in order to avoid applications (designed for phones) appear as small window applications on e.g. tablets.

我的解决办法:

WebView mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setBuiltInZoomControls(true);

最后一行setBuiltInZoomControls(真)为我的问题消失。 我希望这可以帮助你!

the last line setBuiltInZoomControls(true) made the issue disappear for me. I hope this helps you!

:该解决方案昨天工作对我很好,但是今天早上,我再次得到了错误。这可能是解决不了问题。对不起,误导性岗位。

This solution worked fine for me yesterday, however this morning I got the error again. This is probably not the solution. Sorry for misleading post.

现在,我已经改变了我的code,我还没有之后再次经历的错误,我跑了一个测试套件的1000次迭代无故障。有什么解决我的问题是,URL没有被正确地传递给web视图。它得到了一个空字符串,确保正确的URL问题就消失了之后。希望这将帮助别人。

Now I have changed my code and I haven't experienced the error again after that, I ran a test suite of 1000 iterations without fault. What solved my problem was that the url wasn't passed correctly to the webview. It got an empty string, after making sure that a correct url the problem disappeared. Hopefully this will help someone.

这篇关于安卓:这是什么警告信息是指什么? - (WebCore的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆