Search code examples
visual-studiovisual-studio-cordovaparallels

How to run Android emulator in VS.NET 2015 when using Parallels on OSX?


I have a Cordova app. When I select the Android emulator and try to run, I get the following errors:

PANIC: HOME is defined but could not find AVD_GalaxyNexus_ToolsForApacheCordova.ini file in $HOME\.android\avd
(Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME\.android\avd and $HOME\.android\avd)

If the above are environment variables, they do not exist. I'm not sure where .android\avd is supposed to reside.

I'm in Win7. Any ideas how to fix this?


Solution

  • Since you are using Parallels on OSX, there are a few things you need to do. First, two important settings for your VM:

    1. Uncheck the "Shared Profile" option: Options > Sharing > Shared Profile
    2. Enable nested virtualization: Options > Enable nested virtualization

    By default, Parallels puts your documents folder among other things on a network share which does not work very well. Turning off Shared Profile fixes that problem. Enabling nested virtualization should improve performance.

    You can also setup the Android emulator to run on the OSX side for maximum performance pretty easily. Here's instructions for that: https://msdn.microsoft.com/en-us/library/dn913137.aspx

    Finally, here's some additional general guidance on using Parallels: https://msdn.microsoft.com/en-us/library/dn878133.aspx