title: Android Studio: Unable to open connection to: localhost/127.0.0.7:5037, due to: java.net.ConnectException: Connection refused
body: <p>I'm taking the first steps in android development. Started working through this guide <a href="https://developer.android.com/training/basics/firstapp/running-app" rel="nofollow noreferrer">https://developer.android.com/training/basics/firstapp/running-app</a> and the error occurred when the program is run on the device. </p>
  
  <p><strong>First of all, my device is not in the list of connected in Android Studio:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/XTMm9.png" alt="First of all, my device is not in the list of connected in Android Studio"></p>
  
  <p>adb devices doesnt see my device when Android Studio is running, but if I close Android Studio, adb devices shows my device</p>
  
  <p><strong>When Android Studio starts, it shows an error and logs all the time this error flashes:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/6Mz9g.png" alt="When Android Studio starts, it shows an error and logs all the time this error flashes"></p>
  
  <p><strong>I tryed this <a href="https://stackoverflow.com/a/35078826/7803911">this solution</a> but it didnt solve my problem:</strong></p>
  
  <p>I dont know, why Android Studio try to connect to weird address localhost/127.0.0.7:5037? </p>