title: Very simple WebView crashes under API 23 Emulator
body: <p>I have just created an API 23 emulator on my machine:</p>
  
  <ul>
  <li>HAXM: v1.4 with 1GB allocated RAM</li>
  <li>AVD Base: Nexus 4</li>
  <li>RAM: 768MB, and 896MB in a second try</li>
  <li>Heap: 64 MB</li>
  <li>GPU acceleration: no</li>
  </ul>
  
  <p>I tried it successfully with a few apps of my own. But each time I try an application that uses a <code>WebView</code> as a UI, the app crashes that way:</p>
  
  <p><a href="https://i.stack.imgur.com/CVkMS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CVkMS.png" alt="enter image description here"></a></p>
  
  <p>The three first line of this logcat are the only pertaining to my app (highlighted in blue). All other lines do not mention my application package's name in the 'Application' column of LogCat, but one does in the middle of the message (circled in blue).</p>
  
  <p>I can load the HTML code into the <code>WebView</code>. The crash occurs at <code>setContentView(theWebView)</code> time:</p>
  
  <pre><code>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); // THIS IS WHERE THE CRASH OCCURS
      }
  
      [...]
  </code></pre>
  
  <p>Using or not using <code>runOnUiThread()</code> to run <code>mWebview.loadDataWithBaseURL()</code> produces exactly the same result, which is expected as <code>onCreate()</code> is actually on the UI thread.</p>
  
  <p>The html code I am using does not change anything. In the case above, the <code>HTML_CODE</code> variable contains this:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;&lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;Hello&lt;/h1&gt;
          &lt;p&gt;Hello world!&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The app runs perfectly, even with a more advanced HTML+CSS+JS+JS&lt;->Java binding code on all the API 17 and 19 devices and emulators I tried. This is where I'm puzzled. I didn't have a chance to try with an actual Android 6.0 (API 23) device though.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have just :</p>
  
  <ul>
  <li>migrated from Eclipse to Android Studio</li>
  <li>upgraded HAXM to v1.5</li>
  <li>upgraded my SDK Tools (24.4.1) and my platform (23.0.1)</li>
  </ul>
  
  <p>The problem still occurs but the log is different, and a bit clearer. There is a <code>ClassNotFoundException</code> I cannot explain:</p>
  
  <pre><code>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 to 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 at 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)
  </code></pre>
  
  <p>Any idea? (I'm investigating further so I will update this post should I find anything relevant)</p>