title: Android Crash when reach getInputStream
body: <p>I have built this code to get XML from URL
  I used AsyncTask, bust app still crashing when reach the getInputStream() point</p>
  
  <p>The point is I want to get XML from a url as string.</p>
  
  <p>I tried without AsyncTask but the app still crash </p>
  
  <p>I tried put GetXML() function out side the AsyncTask and call from within AsyncTask but still crash.</p>
  
  <p>I tried put GetXML() function inside the AsyncTask and call from within AsyncTask but still crash.</p>
  
  <p>anyone know what is the reason and how to resolve it? thanks</p>
  
  <pre><code>package com.asmgx.test15.app;
  
  import android.os.AsyncTask;
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  import org.w3c.dom.Document;
  import org.xml.sax.InputSource;
  import org.xml.sax.SAXException;
  import org.xml.sax.XMLReader;
  import org.xml.sax.helpers.XMLReaderFactory;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.net.URLConnection;
  
  import javax.xml.parsers.DocumentBuilder;
  import javax.xml.parsers.DocumentBuilderFactory;
  import javax.xml.parsers.ParserConfigurationException;
  
  
  public class MainActivity extends ActionBarActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          AsyncTaskRunner runner = new AsyncTaskRunner();
          runner.execute();
      }
  
  
  
  
      private class AsyncTaskRunner extends AsyncTask&lt;String, String, String&gt; {
  
          private String resp;
  
          private void GetXML() {
              try {
                  URL url = new URL("http://api.androidhive.info/pizza/?format=xml");
                  URLConnection conn = url.openConnection();
  
                  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                  DocumentBuilder builder = factory.newDocumentBuilder();
                  InputStream is = conn.getInputStream(); // CRASH HERE
                  Document doc = builder.parse(is);
  
              }
              catch (MalformedURLException e) {
              }
              catch (IOException e) {
              }
              catch (ParserConfigurationException e) {
              }
              catch (SAXException e) {
              }
          }
  
          @Override
          protected String doInBackground(String... params) {
              publishProgress("Sleeping..."); // Calls onProgressUpdate()
  
                  // Do your long operations here and return the result
                  //int time = Integer.parseInt(params[0]);
                  // Sleeping for given time period
                  GetXML();
                  resp = "Slept for 25562 milliseconds";
  
              return resp;
          }
  
          /*
           * (non-Javadoc)
           *
           * @see android.os.AsyncTask#onPostExecute(java.lang.Object)
           */
          @Override
          protected void onPostExecute(String result) {
              // execution of result of Long time consuming operation
              //finalResult.setText(result);
          }
  
          /*
           * (non-Javadoc)
           *
           * @see android.os.AsyncTask#onPreExecute()
           */
          @Override
          protected void onPreExecute() {
              // Things to be done before execution of long running operation. For
              // example showing ProgessDialog
          }
  
          /*
           * (non-Javadoc)
           *
           * @see android.os.AsyncTask#onProgressUpdate(Progress[])
           */
          @Override
          protected void onProgressUpdate(String... text) {
              //finalResult.setText(text[0]);
              // Things to be done while execution of long running operation is in
              // progress. For example updating ProgessDialog
          }
      }
  
     }
  </code></pre>
  
  <p>This is the Logicat error</p>
  
  <pre><code>07-04 04:49:53.433    1850-1863/com.asmgx.test15.app E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
      Process: com.asmgx.test15.app, PID: 1850
      java.lang.RuntimeException: An error occured while executing doInBackground()
              at android.os.AsyncTask$3.done(AsyncTask.java:300)
              at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
              at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
              at java.util.concurrent.FutureTask.run(FutureTask.java:242)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
  07-04 04:49:56.643    1850-1863/com.asmgx.test15.app I/Process﹕ Sending signal. PID: 1850 SIG: 9
  07-04 04:50:31.313    1899-1899/com.asmgx.test15.app W/ActivityThread﹕ Application com.asmgx.test15.app is waiting for the debugger on port 8100...
  07-04 04:50:31.363    1899-1899/com.asmgx.test15.app I/System.out﹕ Sending WAIT chunk
  07-04 04:50:31.393    1899-1905/com.asmgx.test15.app I/dalvikvm﹕ Debugger is active
  07-04 04:50:31.583    1899-1899/com.asmgx.test15.app I/System.out﹕ Debugger has connected
  07-04 04:50:31.583    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:31.793    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:32.073    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:32.273    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:32.473    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:32.673    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:32.883    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:33.083    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:33.283    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:33.483    1899-1899/com.asmgx.test15.app I/System.out﹕ waiting for debugger to settle...
  07-04 04:50:33.683    1899-1899/com.asmgx.test15.app I/System.out﹕ debugger has settled (1365)
  07-04 04:50:46.343    1899-1899/com.asmgx.test15.app D/gralloc_goldfish﹕ Emulator without GPU emulation detected.
  07-04 04:50:54.343    1899-1914/com.asmgx.test15.app D/dalvikvm﹕ GC_FOR_ALLOC freed 215K, 9% free 3170K/3452K, paused 46ms, total 46ms
  07-04 04:50:57.773    1899-1914/com.asmgx.test15.app W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0xb1ab6ba8)
  07-04 04:51:04.553    1899-1914/com.asmgx.test15.app E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
      Process: com.asmgx.test15.app, PID: 1899
      java.lang.RuntimeException: An error occured while executing doInBackground()
              at android.os.AsyncTask$3.done(AsyncTask.java:300)
              at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
              at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
              at java.util.concurrent.FutureTask.run(FutureTask.java:242)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity.GetXML(MainActivity.java:44)
              at com.asmgx.test15.app.MainActivity.access$100(MainActivity.java:25)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:68)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:57)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
  07-04 05:15:28.973    2141-2141/com.asmgx.test15.app D/dalvikvm﹕ Not late-enabling CheckJNI (already on)
  07-04 05:15:31.803    2141-2141/com.asmgx.test15.app D/gralloc_goldfish﹕ Emulator without GPU emulation detected.
  07-04 05:15:33.073    2141-2154/com.asmgx.test15.app W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0xb1ab6ba8)
  07-04 05:15:33.133    2141-2154/com.asmgx.test15.app D/dalvikvm﹕ GC_FOR_ALLOC freed 202K, 8% free 3183K/3452K, paused 43ms, total 43ms
  07-04 05:15:33.173    2141-2154/com.asmgx.test15.app E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
      Process: com.asmgx.test15.app, PID: 2141
      java.lang.RuntimeException: An error occured while executing doInBackground()
              at android.os.AsyncTask$3.done(AsyncTask.java:300)
              at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
              at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
              at java.util.concurrent.FutureTask.run(FutureTask.java:242)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.GetXML(MainActivity.java:51)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:72)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:40)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.GetXML(MainActivity.java:51)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:72)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:40)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
       Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
              at libcore.io.Posix.getaddrinfo(Native Method)
              at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
              at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
              at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
              at java.net.InetAddress.getAllByName(InetAddress.java:214)
              at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
              at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
              at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
              at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
              at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.GetXML(MainActivity.java:51)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:72)
              at com.asmgx.test15.app.MainActivity$AsyncTaskRunner.doInBackground(MainActivity.java:40)
              at android.os.AsyncTask$2.call(AsyncTask.java:288)
              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
              at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
              at java.lang.Thread.run(Thread.java:841)
  </code></pre>