title: Connection to http://127.0.0.1 refused in android studio
body: <p>I have an error when executing : </p>
  
  <pre><code>HttpPost httpPost = new HttpPost("http://127.0.0.1/nevux/inscription.php"); &lt;br\&gt;
  </code></pre>
  
  <p>this is the error : </p>
  
  <blockquote>
    <p>System.err: org.apache.http.conn.HttpHostConnectException: Connection
    to <a href="http://127.0.0.1" rel="nofollow noreferrer">http://127.0.0.1</a> refused
                      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:193)
                      at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
                      at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
                      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:366)
                      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
                      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
                      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
                      at com.example.spike_x1.meldetect.activities.LoginActivity$2.onClick(LoginActivity.java:94)
                      at android.view.View.performClick(View.java:5609)
    </p>
  </blockquote>
  
  <p>I tried with 10.0.2.2 and 10.0.3.3 and i got the same error. </p>
  
  <p>I'm using ubuntu 17.10 </p>
  
  <p>any help ??</p>