com.android.volley.NoConnectionError - Android emulator with Charles Proxy : <p>I want to proxy network traffic for an Android emulator. </p>

<p>I can't seem to get it to work. </p>

<p>My emulator is booted up using this: </p>

<pre><code>emulator @Nexus_5X_API_23 -http-proxy 10.0.1.17:8888
</code></pre>

<p>The IP and port points to what Charles reports in the Help menu. </p>

<p>The SSL certificate is installed. I can open the emulator browser and Charles shows me all traffic. The browser updates as usual. </p>

<p>All seems good so far. </p>

<p>Now I attempt to run my app. My first network call goes out successfully through Charles. The response returns and Charles displays it. However the response isn't passed to the app successfully. </p>

<p>I've set a breakpoint in the error callback and I can see a <code>com.android.volley.NoConnectionError</code> which is caused by <code>java.io.IOException: unexpected end of stream on Connection</code>. </p>

<p>Why doesn't Charles pass the result back back properly to the app? </p>

<p>Do I need to do what's defined at <a href="https://www.charlesproxy.com/documentation/configuration/browser-and-system-configuration">the end of the configuration page on Charles</a>? </p>

<pre><code>HttpHost httpproxy = new HttpHost("192.168.0.101", 8888, "http");
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,httpproxy);
</code></pre>

<p>This doesn't seem correct - what am I missing? </p>
