I'm new to android and I'm now trying to implement a WebView
example. In my application, the WebView
redirect to a web page. But below in Logcat this is the error it shows. I tried to solve it, but I can't. Help me find it please. I'm really sorry if my question bothers you . This is the error :
我是android新手,现在正在尝试实现一个WebView示例。在我的应用程序中,WebView重定向到一个web页面。但在Logcat下面显示的是错误。我试着去解决它,但我做不到。请帮我找到它。如果我的问题困扰你,我真的很抱歉。这是错误的:
01-02 22:46:42.764: E/chromium(1223): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
01-02 22:46:42.764: E/chromium(1223): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed
01-02 22:46:42.764: E/chromium(1223): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
01-02 22:46:42.764: E/chromium(1223): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
01-02 22:46:42.784: E/chromium(1223): [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed
01-02 22:46:44.724: W/AwContents(1223): nativeOnDraw failed; clearing to background color.
01-02 22:46:45.694: W/AwContents(1223): nativeOnDraw failed; clearing to background color.
01-02 22:46:45.954: W/AwContents(1223): nativeOnDraw failed; clearing to background color.
This is the code I used :
这是我使用的代码:
super.onCreate(savedInstanceState);
setContentView(R.layout.activitymain);
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.sportsone.jp/futsal/m/");
1 个解决方案
#1
3
Sometimes EGL errors can be resolved by simply restarting the android virtual device. Otherwise try enabling the emulator GPU. To do this in Eclipse go to Window > AVD MANAGER select your AVD and click "Edit...". Check the "Use Host GPU" box, then save and restart your AVD.
有时,只要重新启动android虚拟设备,就可以解决EGL错误。否则尝试启用仿真器GPU。要在Eclipse中实现这一点,请转到窗口> AVD MANAGER,选择您的AVD并单击“Edit…”。选中“使用主机GPU”框,然后保存并重新启动AVD。
#1
3
Sometimes EGL errors can be resolved by simply restarting the android virtual device. Otherwise try enabling the emulator GPU. To do this in Eclipse go to Window > AVD MANAGER select your AVD and click "Edit...". Check the "Use Host GPU" box, then save and restart your AVD.
有时,只要重新启动android虚拟设备,就可以解决EGL错误。否则尝试启用仿真器GPU。要在Eclipse中实现这一点,请转到窗口> AVD MANAGER,选择您的AVD并单击“Edit…”。选中“使用主机GPU”框,然后保存并重新启动AVD。