title: Android app is crashing with An error occurred while executing doInBackground() in android 9
body: <p>Android app is crashing with An error occurred while executing doInBackground() in android 9</p>
  
  <p>in version &lt; 9 my app is running good but in android 9 this error is appear so if anyone have the solution please tell me my app is on play store crashes increases day by day so please help me 
  what should i do to solve this ... error</p>
  
  <pre><code>  @Override
      protected String doInBackground(Void... params) {
          String url = "";
          switch (name){        
               case "Islamic channel":
                  url = Constant.Islamic_URL;
                  break;
              case "Faizan-e-Madina":
                  url = Constant.Faizan_e_Madina_URL;
                  break;
  
              default:
                      Log.d("end","case");
          }
              HttpClient httpClient = new DefaultHttpClient(); // here is error show
              HttpGet httpGet = new HttpGet(url);
              try {
                  HttpResponse response = httpClient.execute(httpGet);
                  HttpEntity httpEntity = response.getEntity();
                  return EntityUtils.toString(httpEntity);
  
              } catch (IOException e) {
                  Log.d("DownloadData" , e.getMessage());
                  e.printStackTrace();
              }
          return null;
      }
  </code></pre>