title: Connection to xamm server failed in android studio
body: <p>I am using php to connect my database using xampp server.The data is displayed in json format using the php code.Now i want to display this 
  data in android app in list view. 
  But the app display nothing , maybe i cannot connect database to the app.
  My php code is working .</p>
  
  <p>Logcat show this error - </p>
  
  <blockquote>
    <p>fail to open file: No such file or directory Connect to /10.0.2.2:80
    timed out .</p>
  </blockquote>
  
  <p>MainActivity class-</p>
  
  <pre><code>public class MainActivity extends Activity 
  
  ListView ClubListView;
  ProgressBar progressBar;
  String HttpURL = "http://10.0.2.2/db1/display.php";
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      requestWindowFeature(Window.FEATURE_NO_TITLE);
  
      setContentView(R.layout.activity_main);
  
      ClubListView = (ListView) findViewById(R.id.ClubFormListView);
  
      progressBar = (ProgressBar) findViewById(R.id.ProgressBar1);
  
      new ParseJSonDataClass(this).execute();
  }
  
  private class ParseJSonDataClass extends AsyncTask&lt;Void, Void, Void&gt; {
      public Context context;
      String FinalJSonResult;
      List&lt;Player&gt; ClubList;
  
      public ParseJSonDataClass(Context context) {
  
          this.context = context;
      }
  
      @Override
      protected void onPreExecute() {
  
          super.onPreExecute();
      }
  
      @Override
      protected Void doInBackground(Void... arg0) {
  
          HttpServiceClass httpServiceClass = newHttpServiceClass(HttpURL);
  
          try {
              httpServiceClass.ExecuteGetRequest();
  
              if (httpServiceClass.getResponseCode() == 200) {
  
                  FinalJSonResult = httpServiceClass.getResponse();
  
                  if (FinalJSonResult != null) {
  
                      JSONArray jsonArray = null;
                      try {
  
                          jsonArray = new JSONArray(FinalJSonResult);
                          JSONObject jsonObject;
                          Player player;
  
                          ClubList = new ArrayList&lt;Player&gt;();
  
                          for (int i = 0; i &lt; jsonArray.length(); i++) {
  
                              player = new Player();
  
                              jsonObject = jsonArray.getJSONObject(i);
  
                              player.Player_Name=
                               jsonObject.getString("Name");
  
                              player.Player_Club = 
                              jsonObject.getString("ClubName");
  
                              ClubList.add(player);
                          }
                      } catch (JSONException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                  }
              } else {
  
       Toast.makeText(context, httpServiceClass.getErrorMessage(),
        Toast.LENGTH_SHORT).show();
              }
          } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          return null;
       }
  
      @Override
      protected void onPostExecute(Void result)
  
      {
          progressBar.setVisibility(View.GONE);
  
          ClubListView.setVisibility(View.VISIBLE);
  
          if (ClubList != null) {
  
              ListsAdapter adapter = new ListsAdapter(ClubList, context);
              ClubListView.setAdapter(adapter);
  
          }
        }
        }
  </code></pre>
  
  <p>Logcat</p>
  
  <pre><code>fail to open file: No such file or directory
  Connect to /10.0.2.2:80 timed out 
  at org.apache.http.impl.conn.DefaultClientConnectionOperator.
  openConnection(DefaultClientConnectionOperator.java:149)
  at com.example.phpdata.HttpServiceClass.executeRequest
  (HttpServiceClass.java:108)
   at com.example.phpdata.HttpServiceClass.ExecuteGetRequest
  (HttpServiceClass.java:82)
   com.example.phpdata.MainActivity$ParseJSonDataClass.doInBackground
   (MainActivity.java:65)
   (MainActivity.java:43)  
   (MainActivity.java:101)
  </code></pre>