简体   繁体   English

Appcelerator 4.4+ WebView错误

[英]Appcelerator 4.4+ WebView error

I try to fix the problem with the new Chromium web engine on Android 4.4+ devices. 我尝试使用Android 4.4+设备上的新Chromium Web引擎解决此问题。

I have a WebView in a TableView. 我在TableView中有一个WebView。 On the first pageload the WebView is showed correctly, but when I scroll down on the page(away from the WebView) and back again(back to the WebView) I get a strange error. 在第一个页面加载中,WebView正确显示,但是当我在页面上向下滚动(远离WebView)并再次返回(返回WebView)时,出现一个奇怪的错误。 This error is repeating every vew milliseconds and stops when I scroll down away from the WebView, also the WebViews height is changing to 0. 此错误每隔几毫秒就会重复一次,并在我向下滚动离开WebView时停止,并且WebViews的高度也更改为0。

This is a part of my error log(it's repeating infinite): 这是我的错误日志的一部分(重复无限):

[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[46,tid=10218,Native,Thread*=0x53aebd48,peer=0x65d8b4d0,"Thread-42611"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[47,tid=10219,Native,Thread*=0x5358dbc8,peer=0x65fcd800,"Thread-42612"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[48,tid=10220,Native,Thread*=0x529fd530,peer=0x65841b60,"Thread-42613"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[49,tid=10221,Native,Thread*=0x53eaa468,peer=0x65d58988,"Thread-42614"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[50,tid=10222,Native,Thread*=0x5539ee88,peer=0x65db66b8,"Thread-42615"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[51,tid=10223,Native,Thread*=0x558fbb80,peer=0x65f4bcc8,"Thread-42616"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[52,tid=10225,Native,Thread*=0x553d1178,peer=0x65ddc638,"Thread-42617"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[53,tid=10232,Native,Thread*=0x546de7c0,peer=0x6607af90,"Thread-42618"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[54,tid=10234,Native,Thread*=0x54be4000,peer=0x65e026a0,"Thread-42619"] attached without supplying a name
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Attempt to remove local SIRT entry from IRT, ignoring
[WARN] :   art: Thread[28,tid=10235,Native,Thread*=0x51460480,peer=0x658507b8,"Thread-42620"] attached without supplying a name
[WARN] :   art: Thread[31,tid=10236,Native,Thread*=0x52dc5c28,peer=0x65d72b78,"Thread-42621"] attached without supplying a name

EDIT: This error only appears on Android 4.4+ devices with the new Chromium engine. 编辑:此错误仅在具有新Chromium引擎的Android 4.4+设备上出现。

Does anybody know what this error means? 有人知道这个错误是什么意思吗?

This is my code: 这是我的代码:

var content_post = ui.htmlPostContent(htmlentities.entityToHtml(post.content), post.ID, 15);

        content_post = content_post.replace(/(\shref|\ssrc)=('|")(\/\/)/gi, '$1=$2http:$3');

    var post_content_webview = $.UI.create("WebView", {visible: false, classes: "post_content", html: content_post,  disableBounce: true, borderRadius: 1}),
        loading_webview = $.UI.create("ActivityIndicator", {id:loading_webview, classes:"loading_webview"}),
        post_content_row = $.UI.create("TableViewRow", {classes: "bgWhite", layout: "vertical"});
    post_content_row.add(loading_webview);
    post_content_row.add(post_content_webview);
    $.table.appendRow(post_content_row);

    loading_webview.show();

    post_content_webview.addEventListener("load", function() {
        loading_webview.hide();
        post_content_row.remove(loading_webview);
        if(OS_IOS) {
            post_content_webview.height = post_content_webview.evalJS("document.height;");
            // Nasty hack for iframes
            setTimeout(function() {
                post_content_webview.height = post_content_webview.evalJS("document.height;");
            }, 1000);
        } else {
            setTimeout( function() {
                post_content_row.height = post_content_webview.evalJS("window.innerHeight;") + "dp";
            }, 1000);
        }

        post_content_webview.visible = true;
        $.table.scrollable = true;

        $.post_header.touchEnabled = true;
    });
    //Add post content
    setTimeout(function() {

        if(OS_ANDROID) {
            post_content_webview.height = Ti.UI.SIZE;
        }
    }, 100);

要解决此问题,您必须更新Titanium SDK,请使用最新版本(3.4.0.GA)更新Titanium SDK,然后将解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM