你会使用Visual Studio进行Android开发吗?

如果是这样,你将如何设置android SDK而不是。net框架,有任何特殊的设置或配置吗?


当前回答

我认为你可以在Visual Studio中打开Java文件,直接使用命令行工具。我不认为你会得到语法高亮或自动补全。

Eclipse实际上与Visual Studio并没有太大的不同,并且有很多设计用于使Android开发更舒适的工具可以在Eclipse中工作。

其他回答

自从提出这个问题以来,已经发生了很多变化。Visual Studio 2013更新4和Visual Studio 2015现在已经为Apache Cordova集成了工具,你可以在Android的Visual Studio模拟器上运行它们。

是的,你可以:

http://www.gavpugh.com/2011/02/04/vs-android-developing-for-android-in-visual-studio/

如果你得到“无法找到工具。jar。”你可以添加一个环境变量JAVA_HOME,指向你的Java JDK路径,例如c:\sdks\glassfish3\ JDK(之后重新启动MSVC)

一个更好的解决方案是在Visual Studio中使用WinGDB Mobile Edition:它可以让你在Visual Studio中创建和调试Android项目:

http://ian-ni-lewis.blogspot.com/2011/01/its-like-coming-home-again.html

下载WinGDC for Android http://www.wingdb.com/wgMobileEdition.htm

是的,你可以使用“vs-android”使用Visual Studio for Android(原生)。

下面是设置它的步骤:

在这里下载Android SDK。 在这里下载Android NDK。 点击这里下载Cygwin。 在这里下载JDK。 点击这里下载Visual Studio 2010、2012或2013。 下载vs . android在这里。 在这里下载Apache Ant。 设置环境变量:

(控制面板>系统>高级>环境变量)

ANDROID_HOME = <install_path>\android-sdk
ANDROID_NDK_ROOT = <install_path>\android-ndk
ANT_HOME  = <install_path>\apache-ant
JAVA_HOME = <install_path>\jdk
_JAVA_OPTIONS = -Xms256m -Xmx512m  

从这里下载示例。

它就像一个魔法……也是目前为止最好的使用方法。

你可以使用Visual Studio进行Android开发。在这里可以看到一篇不错的文章

您可以使用c#和Xamarin构建丰富的原生应用程序,并将100%的原生api暴露给您。或者使用c++和可以在iOS或Windows上重用的代码来实现最大的性能。

要跟上本文的内容,你需要一份Visual Studio,再加上“使用。net进行移动开发”的工作负载。您可以在第一次安装Visual Studio时启用此功能,也可以从“工具->获取工具和功能…”菜单项中访问它:

Visual Studio安装程序

When testing and running your app you have the choice of doing so with either an Android emulator running on your development machine, or by directly connecting to an existing Android device. There’s no right option here and different developers prefer different form factors. If you choose the former option, you’ll need to ensure once you’ve selected the workload that on the right-hand pane (‘Installation details’) the checkboxes for Intel Hardware Accelerated Execution Manager and Google Android Emulator are selected (as seen above).

这篇文章将帮助你通过visual studio来做基本的android应用程序。我把链接放在下面。

https://developer.okta.com/blog/2018/12/27/build-a-basic-android-app-with-xamarin-and-visual-studio