1

When I click on the Run App button in Android Studio, the Select Deployment Target dialog box remains empty, even if I have created the "Nexus S API 24" virtual device to run my app. I get the following error:

08:22:39 error: Invalid argument: cannot open transport registration socketpair
08:22:39 could not read ok from ADB Server
08:22:39 * failed to start daemon *
08:22:39 error: cannot connect to daemon
08:22:39 'C:\Users\samarc\AppData\Local\Android\sdk1\platform-tools\adb.exe,start-server' failed -- run manually if necessary

And when I try to run the virtual device directly from the AVD Manager, I get the following list of errors (along with a dialog box saying, "It seems too many emulator instances are running on this machine. Aborting"):

C:\Users\samarc\AppData\Local\Android\sdk1\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_S_API_24
libpng warning: iCCP: known incorrect sRGB profile
Hax is enabled
libpng warning: iCCP: known incorrect sRGB profile
Hax ram_size 0x40000000
libpng warning: iCCP: known incorrect sRGB profile
HAX is working and emulator runs in fast virt mode.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
emulator: WARNING: UpdateCheck: Failure: Error

What should I do? I have already tried the following things:

    1) Checking ports(5554 - 5587) for availability. (are available)
    2) Unblocking ports (5554 - 5587) with Windows Firewall which doesn't work either. (Although I am starting to think that Android Studio uses some other ports. How do I find out which port Android Studio is using anyway?)
    3) Killing the process, "adb.exe" in the Task Manager. (The fact is that there isn't any process called "adb.exe" running in the Task Manager!)
    4) Rebooting the computer. (never works)
    5) Reinstalling Android Studio (didn't work either)

What should I do? I use Windows 7 x64 and Android Studio 2.2.3. Please help anyway you can. I have already asked this question two times in Stack Overflow but I think this is the most detailed one, so please help.

  • Instead of asking the same question multiple times, you should update your existing question. You can always edit your own questions and answers. – Daniel B Jan 28 '17 at 14:44
  • I like your advice but can you find any solution for the question? –  Jan 29 '17 at 05:49
  • I finally solved the issue through sheer luck. Thanks for all the help, anyway! –  Jan 29 '17 at 15:11

2 Answers2

1

I had similar kind of issue earlier.

I followed these steps to solve the problem.you can also try these and any one of these might help you to solve yours:

1.TRY upgrading your android studio's android emulator which could be found in

File>>settings>>Appearance&behavior>>Android SDK or click SDK manager.

Then click SDK tools tab.

And then click Android emulator option and install it/update it. (Similarly you can also try upgrading Android sdk tools and Android SDK platform-tools because it might help you in one or other way). Now try to run your emulator.

2.Try turning off windows-firewall.And then try to run your emulator.

3.Make sure that the other VIRTUAL BOX dockers installed in your PC does not affect your android emulator from running.

4.I FEEL this to be the MOST IMPORTANT THING to check.

Your PC might have Anti-virus software installed in it.

Check whether these Anti-viruses Doesn't BLOCK "ADB.exe" and "qemu-system-i386.exe" in accessing the local port TCP in your PC. When these ask for access "ALLOW" and then try running emulator.

(I had K7 installed in my PC.I re-installed android studio and then tried to run emulator. At that time it asked me for permission either to "ALLOW" or "BLOCk" access to TCP.)

       Try these out and any one of these steps might help you in solving the problem.:-) 
siva
  • 31
  • 3
0

I would recommend cleaning up your SDK installation; I can see the location as sdk1 and not just sdk

The update error is probably because of lack of internet connection.

In Android-Studio, select check for updates

Sarvex
  • 763
  • 2
  • 7
  • 19
  • The location got changed to sdk1 after I reinstalled Android Studio. For some reason I think that the previous Android Studio didn't got uninstalled. –  Jan 16 '17 at 04:00
  • There is a difference between android-studio and android-sdk. Ideally you need only one android-sdk, you can change the current sdk location from android-studio preferences. – Sarvex Jan 16 '17 at 04:25
  • You need to clean up the sdk – Sarvex Jan 16 '17 at 04:26
  • Where do I find the android-studio preferences? –  Jan 16 '17 at 05:09
  • File > Settings [Configuring Android Studio](https://developer.android.com/studio/intro/studio-config.html) – Sarvex Jan 16 '17 at 07:44
  • I changed the android-sdk location but it didn't work. What do you mean by cleaning up the sdk? –  Jan 16 '17 at 08:50
  • I meant changing the SDK location only. Once you have changed the location, kindly update; using "check for update" – Sarvex Jan 16 '17 at 12:00
  • In my experience, it android development is tricky and a lot of issues just go away with updates... – Sarvex Jan 26 '17 at 08:02
  • Now when I try to update Android Studio, it gives an error. –  Jan 26 '17 at 14:50
  • I have posted the new question showing the error. Please, see the question and help me if you can. I have titled the question ' SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Tag mismatch' –  Jan 27 '17 at 16:07
  • You can also see the question here: [link] http://stackoverflow.com/questions/41898175/sslexception-connection-has-been-shutdown-javax-net-ssl-sslexception-tag-mism –  Jan 28 '17 at 10:44