title: ADB device stuck in "connecting" state
body: <p>I'm trying to connect my phone to Android Studio to follow up with some app development. I am currently struggling with connecting my phone to the computer properly, as ADB never seems to connect to the device. </p>
  
  <p>When attempting to boot the app on the device, this is what Android Studio tells me in the run console</p>
  
  <pre><code>com.android.ddmlib.AdbCommandRejectedException: device still connecting
  Error while Installing APK
  </code></pre>
  
  <p>Which leads me to think that this is a problem with ADB. So when I run <code>adb devices</code> I get this log:</p>
  
  <pre><code>List of devices attached
  5210a780f48b44c5        connecting
  </code></pre>
  
  <p>It stays in the "connecting" state no matter how long I wait. I accepted USB debugging and file transfer.</p>
  
  <p>When in Android studio, the device is listed as <a href="https://i.stack.imgur.com/ttGM9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ttGM9.png" alt="enter image description here"></a></p>
  
  <p>I'm out of ideas as to how to fix this. I recently updated my phone (Samsung A5) to Android 8.0. This phone connects and debugs fine on my work computer. I tried updating Android Studio, rebooting my computer, installing Samsung drivers, rebooting my phone, revoking debug access, to no avail. I was able to work on this computer a while back but I don't know what changed.</p>
  
  <p>How can I fix this problem so I can debug on my device? </p>
  
  <p>[EDIT]
  <code>adb version</code> shows this</p>
  
  <pre><code>Android Debug Bridge version 1.0.40
  Version 4797878
  Installed as C:\Users\Frederic\AppData\Local\Android\sdk\platform-tools\adb.exe
  </code></pre>