Can't select android as target in Visual Studio for Mac - android

I have just installed Visual Studio for Mac (On Mac OS X 10.12.1) and I'm trying to target android with no luck in xamarin forms neither native projects. The Android option is greyed.
If I go to Preferences -> SDK Locations -> Android:
Android SDK
Java SDK
Android NDK
are installed and their path is known by Visual Studio (The three checks are green).
Any idea why is this happening?
Thanks.

"The iOS and Android options will be disabled if neither Xamarin.iOS nor Xamarin.Android is installed. If you install those components then these options should be available.
If you look in the about dialog's Show Details page that should indicate what you have installed."
REF

Related

Can't install vsix to Visual Studio 2019 - Android Device Manager has a lower version than required by Visual Studio

I have Visual Studio 2019 installed with Xamarin. I'm trying to get Shell to show up in the project templates. I'm following this post as a guide. But when I install the vsix file, it fails with the error message: Installation of Microsoft.VisualStudio.Android.DeviceManager failed. The extension has a lower version than required by Visual Studio. Please install the extension from Visual Studio Installer instead.
Where in the Visual Studio Installer is the Android Device Manager? I've installed all the Mobile Development tools and all updates....
That post is obsolete - it describes something you needed to do in a Preview version of VS 2019.
In VS Installer, select Workload "Mobile development with .NET".
I was unable to find any Microsoft doc that tells you to simply do that!
I don't recall whether you still need to also do this step:
Setting up the Android SDK for Xamarin.Android.
After installing the Workload mentioned above, restart VS. See if the menu item mentioned below is there. If so, try to make a sample app - maybe this "Android SDK" step is no longer needed - the Workload might set everything up.
Then Android Device Manager will be at menu Tools / Android / Android Device Manager.
Menu location documented here.

Can Android Studio and Visual Studio safely share the same Android SDK?

I'm trying to free up some disk space and so would like one copy of the Android SDK only, aside from not wanting to maintain two of them. Currently I have one installed for each Android Studio and Visual Studio.
I noticed that there is now a separate, Xamarin specific Android SDK manager that Visual Studio uses in place of the one provided by the Android SDK itself.
Also, Visual Studio's Android NDK is located at "C:\ProgramData\Microsoft\AndroidNDK". I don't recall installing it there specifically (probably used a default location), but suppose Android Studio could be pointed at it as well.
Can Android Studio and Visual Studio safely share the same Android SDK?
The answer is Yes, I have done this for a long time and it works fine.
In Visual Studio, Xamarin Android SDK default location is:
C:\Program Files (x86)\Android\android-sdk
C:\ProgramData\Microsoft\AndroidNDK64
In Android Studio, SDK default location is:
C:\Users\username\AppData\Local\Android\Sdk
C:\Users\username\AppData\Local\Android\Sdk\ndk-bundle
Use Visual Studio Android SDK only
You could refer to my answer:
Open Android Studio, go to File -> Project Structure
Change the SDK location to your Visual Studio SDK Location
a. Change it to Xamarin Android SDK Location: C:\Program Files (x86)\Android\android-sdk
b. There is a problem when you change the SDK Location: cannot contain whitespace. You could open CMD as Administrator and type: mklink /J C:\Program-Files-(x86) "C:\Program Files (x86)", like this.
c. Then you could change the SDK Location, effect.
Use Android Studio Android SDK only
You just need change Xamarin Android settings as the above picture. You could find it in:
Tools -> Options -> Xamarin -> Android Setting
It is that new visual studio specific sdk manager I'm worried about.
As #Muhammad said, it won’t broke anything.
Yes, you can. There is no problem at all. You can specify custom SDK path in both Android studio and Visual studio.
Yes for sure, when install visual studio 2017 you can mark in sdk global in individual components tab, and at the end its a path you referring to it in visual studio and android studio.
If you talk about manage this sdk, visual studio 2015 and older versions of visual studio 2017 uses same android sdk manager but lately there is a new sdk manager related to visual studio only not shared between android studio and visually studio

How can i add Android Device under V4.4 to visual studio 2017 emulator Xamarin

Hi i need to run my app on android 4.0.3 device and i downloaded them from vs sdk manager
but when i want to create a new device 4.0.3 version , in the Os list is not displayed.
how can i create a device other than default device ?
How can I add Android Device under V4.4 to visual studio 2017 emulator Xamarin
As #FabriBertani said, you could try use Genymotion instead. But when I use Genymotion on my side, I could only create the emulator that version is higher than 4.1.1:
i want to create a new device 4.0.3 version
So if you need to create an android 4.0.3 version simulator, I still recommended you to use the Android Studio, the Official IDE for Android. It will be quite simple to create such a simulator.
When you install Android Studio, you could you could use the already installed Android SDK, because there's no need for you to download it again. I have written an answer about it and I write it here again:
Install Android Studio, the Official IDE for Android.
Create a blank project and open it.
change Android SDK Path.
a. Go to File -> Project Structure
b. Change the SDK location to your Visual Studio SDK Location
I. Default Xamarin Android SDK Location is C:\Program Files (x86)\Android\android-sdk, you could find it in VS : Tools -> Options -> Xamarin -> Android Settings
II. There is a problem when you change the SDK Location: cannot contain whitespace. You could open CMD as Administrator and type: mklink /J C:\Program-Files-(x86) "C:\Program Files (x86)", like this.
III. Then you could change the SDK Location, effect.
Effect:
In Android Studio, click Tools -> AVD Manager -> Create Virtual Device -> choose a device definition -> click Next:

Share Android SDK between Xamarin Studio and Android Studio on Mac

Is it possible to install and point both Xamarin Studio and Android Studio to a same location for Android SDK, this is just so I could save some space on my Mac. I plan to install both studios, but I thought I would ask if doing so would bring me trouble down the road.
Yes, you can share the Android SDK between both installs.
In this case I installed Xamarin Studio first (and thus the various Android SDKs):
I then installed Android Studio and during the install selected the same Android SDK location:
You can of course go the other way...

Mono for Android

I am trying to develop an Android app using C# and VS2010. I have installed the JDK 1.6, Android SDK, VS2010, and the add-on for Android, Mono for Android. I set the path for the JDK and Android as my system variables. Everything installs okay, but when I try to run VS2010,
I get an error message:
Android SDK not found. Please check whether all the components are
installed and that Mono for Android configuration points to an
existing Android SDK path
You must set Android SDK Location and should Android NDK Location.
In visual studio go to Tools -> Options -> Xamarin
Your path should contain both <sdk-folder>\tools and <sda-folder>\platform-tools to function properly.

Categories

Resources