【发布时间】:2014-11-14 08:16:49
【问题描述】:
我尝试解决 Android 4.4+ 设备上新的 Chromium 网络引擎的问题。
我在 TableView 中有一个 WebView。在第一个页面加载时,WebView 正确显示,但是当我在页面上向下滚动(远离 WebView)并再次返回(回到 WebView)时,我得到一个奇怪的错误。此错误每 vew 毫秒重复一次,当我向下滚动离开 WebView 时停止,WebViews 高度也变为 0。
这是我的错误日志的一部分(它无限重复):
[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
编辑:此错误仅出现在具有新 Chromium 引擎的 Android 4.4+ 设备上。
有人知道这个错误是什么意思吗?
这是我的代码:
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);
【问题讨论】:
标签: android webview titanium appcelerator titanium-alloy