i have created api 23 emulator on machine:
- haxm: v1.4 1gb allocated ram
- avd base: nexus 4
- ram: 768mb, , 896mb in second try
- heap: 64 mb
- gpu acceleration: no
i tried few apps of own. each time try application uses webview
ui, app crashes way:
the 3 first line of logcat pertaining app (highlighted in blue). other lines not mention application package's name in 'application' column of logcat, 1 in middle of message (circled in blue).
i can load html code webview
. crash occurs @ setcontentview(thewebview)
time:
public class myactivity extends activity { private webview mwebview = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); mwebview = new webview(this); mwebview.loaddatawithbaseurl("file:///android_asset/", html_code, "text/html", "utf-8", null); setcontentview(mwebview); // crash occurs } [...]
using or not using runonuithread()
run mwebview.loaddatawithbaseurl()
produces same result, expected oncreate()
on ui thread.
the html code using not change anything. in case above, html_code
variable contains this:
<html> <head></head> <body> <h1>hello</h1> <p>hello world!</p> </body> </html>
the app runs perfectly, more advanced html+css+js+js<->java binding code on api 17 , 19 devices , emulators tried. i'm puzzled. didn't have chance try actual android 6.0 (api 23) device though.
edit
i have :
- migrated eclipse android studio
- upgraded haxm v1.5
- upgraded sdk tools (24.4.1) , platform (23.0.1)
the problem still occurs log different, , bit clearer. there classnotfoundexception
cannot explain:
10-28 20:26:05.102 2168-2168/com.example.myapp w/system: classloader referenced unknown path: /data/app/com.example.myapp-1/lib/x86 10-28 20:26:08.583 2168-2168/com.example.myapp e/datareductionproxysettinglistener: no drp key due exception:java.lang.classnotfoundexception: com.android.webview.chromium.drp 10-28 20:26:09.393 2168-2213/com.example.myapp w/chromium: [warning:data_reduction_proxy_config.cc(423)] spdy proxy off @ startup 10-28 20:26:12.521 2168-2286/com.example.myapp a/chromium: [fatal:gl_surface_android.cc(58)] check failed: kglimplementationnone != getglimplementation() (0 vs. 0) 10-28 20:26:12.521 2168-2286/com.example.myapp a/libc: fatal signal 6 (sigabrt), code -6 in tid 2286 (gputhread)
any idea? (i'm investigating further update post should find relevant)
this behaviour not caused erroneous setting of avd or missing prerequisite (harware, etc...).
as cryptojuice mentioned in comments this caused opengl es prerequisite issue on emulator side:
#8 ...@chromium.org
unfortunately opengl es 2.0 support has been mandatory devices since @ least android 4.0, haven't ever explicitly supported gles 1.x @ , working before accident :/
it seems bit problematic emulator (without host gpu emulation) doesn't meet minimum requirements android devices.
we might able work around emulator @ significant performance cost; we're talking emulator team best thing here is.
now fixed (sdk tools 25.1 rc1 / platform 23 rev 3), though doesn't appear on ticket linked above.
Comments
Post a Comment