简体   繁体   中英

How to setup Visual Studio for Xamarin.Android?

In the developers preview of VS2015 I've seen that you can now develop Android Apps in Visual Studio using Xamarin.
After a few hours of googling I still haven't found how to setup VS2015 for Android. The only tutorial provided on the official Xamarin page is on how to link your PC with a Mac to build iOS Apps.

No matter, what I do, I still have only "Build native Android apps in C#" as a Project template which redirects me to the Xamarin download page.

Here's what I've done so far:

  • Downloaded and installed Xamarin
  • Restarted computer
  • Uninstalled Xamarin and VS2015 (I had a lot of plugins)
  • Reinstalled Visual Studio 2015 (maybe a clean install fixes the problem)
  • Reinstalled Xamarin
  • Opened sample code from Xamarin page (Project type not supported)

After all it still doesn't work and google isn't going to help me either.

(PS: Please don't suggest using Xamarin studio)

Apparently the setup leaves out any Visual Studio (2010, 2012, 2013 and 2015) support by default.

Here's the solution:

  • Press [Win+R] and type control
  • Select Programs and Features
  • Select Xamarin and click the "Change" button
  • In the setup click "Next", then click "Change"
  • Here you can select which VS Support should be installed
  • Apply the changes by clicking "Next", then click "Change"

Just follow the steps here ("Create an Android project"):

https://msdn.microsoft.com/en-us/library/dn879698(v=vs.140).aspx

In Visual Studio, create a new Blank App (Android) project and name it WeatherApp. You can find this template under Visual C#->Android in the New Project dialog box. If you haven't yet installed Xamarin for Visual Studio 2015 Preview, choose the Build native Android apps in C# template and follow the instructions to install it. In the Control Panel, Open Programs and Features, choose the Xamarin item, and then choose the Change button. In the setup wizard for Xamarin, choose the Next button, and then choose the Change button. In the list of optional features to install, choose the icon next to Xamarin for Visual Studio 2015, and then choose Will be installed on local drive. After you've installed Xamarin, the Blank App (Android) project template will appear in the Android section of templates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM