1

unable to connect to adb.check the event log for a possible issue, verify that localhost entry is pointing to 127.0.0.1 or:: 1 for ipv4 or ipv6.

Getting an error while running my sample application in android device.

ADB error on a fresh installation of android studio.

Image

Hasitha Jayawardana
  • 2,326
  • 4
  • 18
  • 36
Mujas
  • 39
  • 5

1 Answers1

2

Finally I got answer for my own question. This is due to some Windows OS update issue. Please follow the below step to confirm.

  1. Goto C:\Users\bn\AppData\Local\Android\Sdk\platform-tools
  2. Open command prompt from this location and type, adb devices
  3. If you get below error dialog, then the problem is with your windows setup and not any issues with Android Studio.

adb command error

Image

Solution:

Download the package for your Windows version from below link. In my case I have downloaded "All supported x64-based versions of Windows 8.1" package and installed the exe. Once installation is complete check the adb command. It should work.

https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

Mujas
  • 39
  • 5
  • 1
    When i tried to install windows (7 ,64bit) update it shows error => installer encountered an error 0xc8000222. any solution? – Adarsh Vijayan P Jul 12 '19 at 10:57
  • @AdarshVijayanP Yes I am also getting sane error .. Any solution? – fazil Jul 27 '19 at 06:08
  • @fazil No perfect solution yet. But go back to previous [platform tool](https://stackoverflow.com/a/55897920/9427138) may fix for now. And check out [this](https://issuetracker.google.com/issues/131883685) google issue tracker if you also facing AAPT2 failing error after updating android studio 3.4 or gradle. It's a bug i think. They are trying to fix. – Adarsh Vijayan P Jul 27 '19 at 06:20