Tôi nhận được tín hiệu SIGSEGV khi tôi cố gắng tải HTML vào một WebView với các plugin flash nhúng (chủ yếu là youtube) với loadDataWithBaseURL với PluginState được đặt thành PluginState.ON. Tôi có thể tạo lại lỗi với một trường hợp thử nghiệm đơn giản. Xem mã sau:SIGSEGV tải HTML + Flash vào một WebView
package ians.android2;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebSettings;
public class TestAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView wv = (WebView)findViewById(R.id.webview);
wv.getSettings().setPluginState(WebSettings.PluginState.ON);
String html = "";
html += "<object width=\"620\" height=\"376\">";
html += "<param name=\"movie\" value=\"http://www.youtube.com/v/C4KdcRHoXOA?fs=1&hl=en_US&rel=0\"></param>";
html += "<param name=\"allowFullScreen\" value=\"true\"></param>";
html += "<param name=\"allowscriptaccess\" value=\"always\"></param>";
html += "<embed src=\"http://www.youtube.com/v/C4KdcRHoXOA?fs=1&hl=en_US&rel=0\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"620\" height=\"376\"></embed>";
html += "</object>";
wv.loadDataWithBaseURL("notreal/", html, "text/html", "utf-8", null);
}
}
Đây là trên HTC Desire HD sử dụng firmware mới nhất dựa trên 2.2.1. Stock ROM, không có công cụ tùy chỉnh. – Ian