title: Android volley error: "Trust anchor for certification path not found", only in real device, not emulator
body: <p>I'm having a problem in my Android app, in one of my fragments I use volley to do a network request:</p>
  
  <pre><code>JsonObjectRequest request = new JsonObjectRequest(
              Request.Method.POST,
              CustomNetworkManager.getInstance(this.getActivity().getApplicationContext()).getRequestUrl(url),
              requestData,
              new Response.Listener&lt;JSONObject&gt;() {
                  @Override
                  public void onResponse(JSONObject response) {
                      // process response
                      } catch (JSONException e) {
                          e.printStackTrace();
                      }
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      Log.d("FeedFragment", "Volley error: " + error.toString());
                  }
              });
  </code></pre>
  
  <p>On a real device I get the following error (running API23):</p>
  
  <pre><code>D/FeedFragment: Volley error: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
  </code></pre>
  
  <p>In an AVD running the same API version it is working fine. I checked other similar threads but couldn't find an answer.</p>
  
  <p>Thanks for your help.</p>
  
  <p><strong>edit: If anyone faces the same error, make sure you don't have any problems with your certificates (<a href="http://developer.android.com/intl/pt-br/training/articles/security-ssl.html#CommonProblems" rel="noreferrer">http://developer.android.com/intl/pt-br/training/articles/security-ssl.html#CommonProblems</a>)</strong></p>