7

I have prior experience (rusty) with Eclipse and I recently downloaded Android Studio for Mac (El Capitan). I'd like to run my "hello world" program on virtual machine. I picked (Nexus 7 2012 API 23) but in Android Virtual Device Manager I'm getting "Failed to Load" message and Details gives:

Name: Nexus_7_2012_API_23
CPU/ABI: Google APIs ARM (armeabi-v7a)
Path: /Users/user/.android/avd/Nexus_7_2012_API_23.avd
Error: Unknown target 'Google Inc.:Google APIs:23' in
/Users/user/.android/avd/Nexus_7_2012_API_23.ini

In Android SDK, I have the following loaded:

    null            
null    23  2   Installed
null    23  2   Not installed
null    23  2   Not installed
null    23  1   Not installed
null    23  1   Installed
null    23  3   Installed
null    23  7   Installed
null    23  7   Installed
null    23  1   Installed
null    23  7   Installed
null    23  11  Installed
null    23  11  Installed
null    23  1   Installed

Basically all the 23 packages including Google APIs. Just not the TV stuff.

When I hit the arrow to run my program, it builds fine, but no emulator launches. This is not surprising given the message in the AVD. It would be nice if when you ran it, there was some sort of message saying the image won't work.

Any ideas?

Thanks,

Dave

Dave
  • 8,095
  • 14
  • 56
  • 99
  • After installing Android Studio are you running in a old SDK directory/did you newly create your AVD or using 'older' ones? – Morrison Chang Dec 29 '15 at 03:02
  • Morrison, Thanks for the response. Not sure I understand but it sounds tantalizingly close! I created a project and took the defaults. Directory is just /AndroidStudioProjects/Application1. When I went to run it, I then created the AVD. Do I somehow need to tell project where the AVD lives? – Dave Dec 29 '15 at 06:59
  • 1
    Sorry I was asking if your machine has a prior Android SDK installation and you happened to point to it through Android Studio or its a fresh new Android SDK install. I would just launch the AVD manager and delete all emulators and create a new one. Did you look inside the .ini file with the error to see if anything looks wrong? – Morrison Chang Dec 29 '15 at 07:05

2 Answers2

23

Wow, what a pain. After all that, it turns out that just closing and reopening Android Studio did the trick. Also, beware that Virtual Device seems to take forever (minutes?) to come up. At least on my MacBook Air Mid 2012. Processor: 1.8 GHz i5 Memory 4 GB 1600 MHz DDR3.

Thanks Morrison Chang for ideas. -Dave

Dave
  • 8,095
  • 14
  • 56
  • 99
  • 2
    You should choose your own answer as the correct answer. This did the trick for me. – Jan Jan 19 '16 at 20:51
6

I had this issue when I had Docker for Mac running. I quit Docker for Mac and it works. It seems to be due to an issue with conflicting virtual machines.

SamHennessy
  • 4,288
  • 2
  • 18
  • 17