Bug 52336 - [FirstRun]Change Android SDK default installation location
Summary: [FirstRun]Change Android SDK default installation location
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: FirstRun ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: High enhancement
Target Milestone: ---
Assignee: Nina
Depends on: 33052
Blocks: 30362
  Show dependency tree
Reported: 2017-02-06 20:23 UTC by Jon Douglas [MSFT]
Modified: 2017-08-15 16:58 UTC (History)
8 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 52336 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description Jon Douglas [MSFT] 2017-02-06 20:23:31 UTC

Currently the Android SDK is installed to `C:\Program Files (x86)\Android\android-sdk`. This is problematic for a few reasons which I will try to outline below.

1. External tooling like multidex and proguard will fail quietly unless the SDK does not include a space:


These type of bugs are very rough for our customers in general as we then have to educate them to change the Android SDK location or we have to hotfix the path to ignore spaces or use the windows environment variables.

2. Android NDK will misbehave if the path includes a space. This is apparent when installing Android Studio and thus why Android Studio installs a separate SDK even if a user had an existing Xamarin SDK that had a space in the path.


3. The ability to reuse the SDK is very important for many tools and developers switching between Android Studio and Xamarin. Is there a reason why we cannot use the Android Studio default which sits at `C:\Users\[USERNAME]\AppData\Local\Android\Sdk`? If we installed at this location, Android Studio would be very happy as well!
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2017-02-07 01:34:54 UTC
## Non-engineering team preliminary quick review: probably an UPSTREAM request

I believe this report is out of the scope of the Xamarin for Visual Studio .msi or .vsix installers (which are the precise pieces of code covered by this particular "Visual Studio Extensions | Installer" Bugzilla category).  Those installers do not touch the Android SDK.

I believe it is also out of the scope of the XamarinInstaller.exe "Universal" installer for Windows (which is primarily used for installing into the older VS 2012 and VS 2013).  I double-checked quickly, and the current version of the Universal installer does appear to install the Android SDK by default into %LOCALAPPDATA%.  (On a side note, it is perhaps worth noting that the %LOCALAPPDATA% path can very easily contain spaces if the user name contains spaces.)

That leaves the VS 2015 installer and the VS 2017 RC installer.  In that case, this report will be marked as UPSTREAM.  The Android SDK as installed by those Visual Studio installers is also used by several Android toolsets in Visual Studio (such as Cordova), not just the Xamarin extensions, and those installers are maintained by the VS installer team.

Comment 2 Jose Gallardo 2017-02-14 16:36:40 UTC
Moving the issue to C9SR1 (15.1)
It looks like an upstream issue, but I'll keep it open for now to keep tracking while we find out if there is anything doable on our side (like pushing for a Willow manifest change, or something like that).

Comment 3 Pierce Boggan [MSFT] 2017-08-15 16:58:41 UTC
We have tentatively decided against changing the location in 15.4 (as we are feature and bug locked). We can reexamine this change once we need to bump Android Tools to 26, per Nina.