title: Try-with-resources requires API level 19 (OkHttp)
body: <p>I am trying to get web server response with OkHttp.
  My current  <code>minSdkVersion 15</code>.</p>
  
  <p>My code is </p>
  
  <pre><code>    @Override
      protected String doInBackground(String... strings) {
  
          GetDataFromUrl getData = new GetDataFromUrl();
          String response = null;
          try {
                  response = getData.run(URL);
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          return response;
      }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>String run(String url) throws IOException {
  Request request = new Request.Builder()
                  .url(url)
                  .build();
  
          try (Response response = client.newCall(request).execute()) {
              return response.body().string();
          }
      }
  </code></pre>
  
  <p>I am getting a warning at the line <code>try (Response response = client.newCall(request).execute())</code>.</p>
  
  <p>It's saying "<code>Try-with-resources requires API level 19 (current min is 15)</code>.</p>
  
  <p>I know that if I change the minimum API level to 19, it'll work fine. But I have to support min 15 API level.</p>
  
  <p>Is there any solution?</p>