Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Visual Studio 2015 installer know that I already have Android SDK?

When I am installing Visual Studio 2015 I realized that it says Java SE Development Kit is already exists on the computer. I think installer knew it because of environment variables. That's why I set ANDROID_SDK_HOME and ANDROID_NDK environment variables.

But when I launch the installer again it is still aware of only Java Development Kit.

Do I set wrong environment names? How to make the installer know that I already have SDK and NDK?

like image 758
zgrkpnr89 Avatar asked Aug 03 '15 16:08

zgrkpnr89


People also ask

How do I download Android SDK into Visual Studio code?

The simplest way to set up the prerequisites is to download "Android Studio for Windows", run it, and follow the "Setup Wizard" it will present to guide you through installing the Android SDK. After that, the Android SDK will be available in %APPDATA%/Android/SDK , where Water will pick it up automatically.

What is the Manager that is used to download Android SDK tools platforms and other components that you need for developing Xamarin?

Visual Studio includes an Android SDK Manager that you use to download Android SDK tools, platforms, and other components that you need for developing Xamarin.


4 Answers

Visual Studio 2015 installer doesn't use ANDROID_SDK_HOME environment variable to detect SDK. You have to create the following registry entry.

enter image description here

  • Open REGEDIT and navigate to HKEY_LOCAL_MACHINE\SOFTWARE. You have to add new key Android SDK Tools (if not already present) by right clicking SOFTWARE.

  • Now add a new String Value Path by right clicking Android SDK Tools and enter path of android sdk as its value

I have tested it and visual studio 2015 installer successfully detected my existing Android SDK

Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=859#c18

like image 175
Abdul Rauf Avatar answered Oct 08 '22 08:10

Abdul Rauf


in installer, uncheck downloading android SKDs and let visual studio install completely, then in visual studio go to Tools -> Options -> Xamarin -> Android setting, locate your SDK's path in "Android SDK Location" and locate your NDK's path in "Android NDK location".

like image 38
Pourya8366 Avatar answered Oct 08 '22 10:10

Pourya8366


I could do it by going to:

Tools->Options->Tools for Apache Cordova->Environment Variable Overrides

Then putting the Android SDK Path into ADT_HOME variable(you must check the box first)

Default SDK path is:

C:\Users\ {YOUR USER} \AppData\Local\Android\sdk

Android SDK and ADT are different things, but Visual Studio could find the SDK this way.

like image 3
Lucas Marques Avatar answered Oct 08 '22 10:10

Lucas Marques


It's worth a try:

Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK. Navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools

in the folder tree on the left. Modify the Path registry variable to match the path to your Android SDK. Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.

If it's not there you will have to create the Android Sdk Tools key in Wow6432Node

with the value C:\Users\myUserName\AppData\Local\Android\sdk

Source:

https://msdn.microsoft.com/en-us/library/mt228282.aspx
like image 2
iOSAndroidWindowsMobileAppsDev Avatar answered Oct 08 '22 08:10

iOSAndroidWindowsMobileAppsDev