How can I use MS Visual Studio for Android Development? - android
Can you use Visual Studio for Android Development?
If so how would you set the android SDK instead of .NET framework and are there any special settings or configuration?
Yes, you can use Visual Studio for Android (native) using "vs-android".
Here are the steps to set it up:
Download the Android SDK here.
Download the Android NDK here.
Download Cygwin here.
Download the JDK here.
Download Visual Studio 2010, 2012 or 2013 here.
Download vs-android here.
Download Apache Ant here.
Set environment variables:
(Control Panel > System > Advanced > Environment Variables)
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
Download examples from here.
It works like a charm... and best so far to use.
Yes you can:
http://www.gavpugh.com/2011/02/04/vs-android-developing-for-android-in-visual-studio/
In case you get "Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre6\lib\tools.jar" you can add an environment variable JAVA_HOME that points to your Java JDK path, for example c:\sdks\glassfish3\jdk (restart MSVC afterwards)
An even better solution is using WinGDB Mobile Edition in Visual Studio: it lets you create and debug Android projects all inside Visual Studio:
http://ian-ni-lewis.blogspot.com/2011/01/its-like-coming-home-again.html
Download WinGDC for Android from
http://www.wingdb.com/wgMobileEdition.htm
Believe me, I've tried so hard to find a decent IDE for Android developement but I failed. I used Visual Studio for many years, and it is so hard for me to get use to the way Eclipse doing things.
However, the new IntelliJ supports for Android development, it's the closest you can get.
From the Android documentation:
The recommended way to develop an Android application is to use Eclipse with the ADT plugin... However, if you'd rather develop your application in another IDE, such as IntelliJ, or in a basic editor, such as Emacs, you can do that instead.
Currently, there are plug-ins for IntelliJ IDEA and NetBeans, but you can still use the tools in /tools to build, debug, monitor, measure and start the emulator.
Much has changed since this question was asked. Visual Studio 2013 with update 4 and Visual Studio 2015 now have integrated tools for Apache Cordova and you can run them on a Visual Studio emulator for Android.
Microsoft Visual Studio 2015 now has options for Android development: C++, Cordova, and C# with Xamarin. When choosing one of those Android development options, Visual Studio will also install the brand new Visual Studio Emulator for Android to use as a target for debugging your app. You can also download the emulator without needing to install Visual Studio. For more details see
Visuals Studio 2015
https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
Visual Studio Emulator
https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx
Video of features https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2015-Final-Release-Event/Visual-Studio-Emulator-for-Android
Java Extension for Visuals Studio 2012, 2013. 2015
https://visualstudiogallery.msdn.microsoft.com/bc561769-36ff-4a40-9504-e266e8706f93
That depends on what you actually want to achieve.
You want to keep on making normal Java-based Android application, but use Visual Studio for development? Then it's bad news, as Visual Studio has no built-in java support. Thus, if you use it out-of-the-box, you will lose all Java-specific Eclipse functionality (IntelliSense for Java, Java debugger, wizards, etc) as well as numerous Android plugins (that are Eclipse-specific and won't work with VS).
On the other hand, you can use Mono for Android to develop apps in C# in VS, but they won't look as smooth as the native apps (some functionality might be missing, look-and-feel slightly different, etc.). In that case such app could sell less than a "normal" Java app that looks and feels like all other Java apps.
If you are talking about native Android code (in C/C++), such as games, the news are not as bad. As Visual Studio has no problem with C++, there are numerous ways to make it work:
If you only want to compile your code, you can use the free vs-android toolset. It's essentially a set of build rules telling Visual Studio how to launch Android compiler.
If you want to compile and debug your native code with Visual Studio, you will need something more advanced, such as VisualGDB for Android. It can build/debug your Native code independently, or together with debugging Java code from Eclipse.
I know this q is quite old but it might me useful:
http://blogs.nvidia.com/2013/02/nvidia-introduces-nsight-tegra-to-assist-android-developers/
Besides, you can use VS for Android development too, because in the end, the IDE is nothing but a fancy text editor with shortcuts to command line tools, so most popular IDE's can be used.
However, if you want to develop fully native without restrictions, you'll have all kinds of issues, such as those related to file system case insensitivity and missing libraries on Windows platform..
If you try to build windows mobile apps on Linux platform, you'll have bigger problems than other way around, but still makes most sense to use Linux with Eclipse for Android OS.
You can use Visual Studio for Android Development. See a nice article on it here
I suppose you can open Java files in Visual Studio and just use the command line tools directly. I don't think you'd get syntax highlighting or autocompletion though.
Eclipse is really not all that different from Visual Studio, and there are a lot of tools that are designed to make Android development more comfortable that work from within Eclipse.
You can Build rich native apps using C# and Xamarin with 100% of the native APIs exposed to you. Or push maximum performance using C++ with code that could be reused with iOS or Windows.
To follow along you’ll need a copy of Visual Studio, plus the ‘Mobile development with .NET’ workload. You can either enable this feature from first installation of Visual Studio or access it from the ‘Tools -> Get Tools and Features…’ menu item:
Visual Studio Installer
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).
This article will help you to do basic android application through visual studio. I'll put the link here below down.
https://developer.okta.com/blog/2018/12/27/build-a-basic-android-app-with-xamarin-and-visual-studio
If you want to create an Android application using c# language you can use Xamarin.
they created this great Cross Platform development tool which enables developers to develop iOS and Android apps in C# language.
Xamarin is offered in different licenses from free to enterprise levels but for not I will be using the starter version which is the free version. It includes the Xamarin Studio which is great start for those who want to try out creating their first apps for Android, they also offer a Business license which lets you develop in Visual Studio so you can use that rich experience similar to developing Web Apps or Windows Apps, then they have this Enterprise which contains everything
You can use Visual Studio 2015 to building cross-platform apps for Android, iOS, and Windows.
IDE: https://www.visualstudio.com/en-US/explore/cordova-vs
Hope this will help!
Related
Android Studio without Java
I would like to use Android Studio for a C++/OpenGL NDK project but I do not want to have Oracle's Java installed on my computer, as it is a security risk. Is there anyway to use this IDE without ever installing Java?
Android Studio itself relies on Java, so it is not possible to run Android Studio without a JVM. Most of the weaknesses in java, are related to running untrusted code. This is a significant problem when the browser plugin is enabled, but without the browser plugin, the language attack surface is significantly smaller.
No you should have JDK to use NDK inside of android studio how ever you can develop android apps with xamarin in visual studio using c++ language... also in android studio 3 you can use kotlin language for developing but thats preview version.
Android Studio comes with integrated JRE (OpenJDK) and can run without installing standalone Oracle Java BUT I don't know how it is about C++ support with it, as you need java headers
Where is Windows Phone Simulator for Xamarin Forms?
I have created a Xamarin forms multi-platform project. Using Xamarin Studio Community 6.3. The project contains three folder. Project and Project.iOS and Project.Droid. I have implemented most of code inside the Project folder which is supposed to be shared across all platforms. When I choose to Run the project there are only options for project.iOS and project.Droid, what about running on Windows phone? I can't seem to find that option either on Xamarin Studio or Visual Studio Community 2017. Also when I look into some of the samples downloaded from Xamarin websites. I see included projects which are no longer supported by Xamarin Studio. I'm new to Xamarin mobile development and I used to hear that it supports all platforms including windows. So are there any major changes I should know about or any mandatory tools I may have neglected ?
I don't think there is a Windows emulator for a mac computer. If you have a windows computer with visual studio 2017 you can choose to install the emulator with the installer. PS: for the second part of your questions, new things get added to Xamarin which end up in not supporting every version. For example I use async methods to get data from WCF service en put them in my local database. Async methods are supported in Xamarin. However your computer needs at least Xamarin.Android version 4.8+ to be able to utilize async methods.
Setting up Android environment in Eclipse
While creating Android environment in eclipse, I receive this error: Folder can't be moved because it's open in another folder , and when updating, it all fails as Eclipse doesn't find the SDK location, because emaluator.exe file is no longer existing as part of the tools of the SDK. I have preinstalled system-image, etc. Any ideas on how to fix this issue without re-installation?
As a beginner and as now Google has their own IDE for developing Android App, you better should start your development journey with Android Studio. It is powerful, beautiful and very easy to use. Why you are using Eclipse still now? If you use Eclipse, you have to install Android SDK, Android Emulator. And you are getting all the tools in one place with Android Studio. Moreover, Android Studio has IntelliJ engine inside. It is known as the best java ide. Super auto code completion, intelligent code inspector and so on.
Android Studio has become the way to go for Android developers now-a-days. It is easier to use because is based on the IntelliJ Idea which is per se a much better java programming environment than eclipse, it predicts way better what you may need to write, and google has made it so that you have all your interface, simulator and code all in the same environment. On top of that google won't update the Android SDK to work with Eclipse anymore!
Android in Visual Studio [duplicate]
Can you use Visual Studio for Android Development? If so how would you set the android SDK instead of .NET framework and are there any special settings or configuration?
Yes, you can use Visual Studio for Android (native) using "vs-android". Here are the steps to set it up: Download the Android SDK here. Download the Android NDK here. Download Cygwin here. Download the JDK here. Download Visual Studio 2010, 2012 or 2013 here. Download vs-android here. Download Apache Ant here. Set environment variables: (Control Panel > System > Advanced > Environment Variables) 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 Download examples from here. It works like a charm... and best so far to use.
Yes you can: http://www.gavpugh.com/2011/02/04/vs-android-developing-for-android-in-visual-studio/ In case you get "Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre6\lib\tools.jar" you can add an environment variable JAVA_HOME that points to your Java JDK path, for example c:\sdks\glassfish3\jdk (restart MSVC afterwards) An even better solution is using WinGDB Mobile Edition in Visual Studio: it lets you create and debug Android projects all inside Visual Studio: http://ian-ni-lewis.blogspot.com/2011/01/its-like-coming-home-again.html Download WinGDC for Android from http://www.wingdb.com/wgMobileEdition.htm
Believe me, I've tried so hard to find a decent IDE for Android developement but I failed. I used Visual Studio for many years, and it is so hard for me to get use to the way Eclipse doing things. However, the new IntelliJ supports for Android development, it's the closest you can get.
From the Android documentation: The recommended way to develop an Android application is to use Eclipse with the ADT plugin... However, if you'd rather develop your application in another IDE, such as IntelliJ, or in a basic editor, such as Emacs, you can do that instead. Currently, there are plug-ins for IntelliJ IDEA and NetBeans, but you can still use the tools in /tools to build, debug, monitor, measure and start the emulator.
Much has changed since this question was asked. Visual Studio 2013 with update 4 and Visual Studio 2015 now have integrated tools for Apache Cordova and you can run them on a Visual Studio emulator for Android.
Microsoft Visual Studio 2015 now has options for Android development: C++, Cordova, and C# with Xamarin. When choosing one of those Android development options, Visual Studio will also install the brand new Visual Studio Emulator for Android to use as a target for debugging your app. You can also download the emulator without needing to install Visual Studio. For more details see Visuals Studio 2015 https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs Visual Studio Emulator https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx Video of features https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2015-Final-Release-Event/Visual-Studio-Emulator-for-Android Java Extension for Visuals Studio 2012, 2013. 2015 https://visualstudiogallery.msdn.microsoft.com/bc561769-36ff-4a40-9504-e266e8706f93
That depends on what you actually want to achieve. You want to keep on making normal Java-based Android application, but use Visual Studio for development? Then it's bad news, as Visual Studio has no built-in java support. Thus, if you use it out-of-the-box, you will lose all Java-specific Eclipse functionality (IntelliSense for Java, Java debugger, wizards, etc) as well as numerous Android plugins (that are Eclipse-specific and won't work with VS). On the other hand, you can use Mono for Android to develop apps in C# in VS, but they won't look as smooth as the native apps (some functionality might be missing, look-and-feel slightly different, etc.). In that case such app could sell less than a "normal" Java app that looks and feels like all other Java apps. If you are talking about native Android code (in C/C++), such as games, the news are not as bad. As Visual Studio has no problem with C++, there are numerous ways to make it work: If you only want to compile your code, you can use the free vs-android toolset. It's essentially a set of build rules telling Visual Studio how to launch Android compiler. If you want to compile and debug your native code with Visual Studio, you will need something more advanced, such as VisualGDB for Android. It can build/debug your Native code independently, or together with debugging Java code from Eclipse.
I know this q is quite old but it might me useful: http://blogs.nvidia.com/2013/02/nvidia-introduces-nsight-tegra-to-assist-android-developers/
Besides, you can use VS for Android development too, because in the end, the IDE is nothing but a fancy text editor with shortcuts to command line tools, so most popular IDE's can be used. However, if you want to develop fully native without restrictions, you'll have all kinds of issues, such as those related to file system case insensitivity and missing libraries on Windows platform.. If you try to build windows mobile apps on Linux platform, you'll have bigger problems than other way around, but still makes most sense to use Linux with Eclipse for Android OS.
You can use Visual Studio for Android Development. See a nice article on it here
I suppose you can open Java files in Visual Studio and just use the command line tools directly. I don't think you'd get syntax highlighting or autocompletion though. Eclipse is really not all that different from Visual Studio, and there are a lot of tools that are designed to make Android development more comfortable that work from within Eclipse.
You can Build rich native apps using C# and Xamarin with 100% of the native APIs exposed to you. Or push maximum performance using C++ with code that could be reused with iOS or Windows. To follow along you’ll need a copy of Visual Studio, plus the ‘Mobile development with .NET’ workload. You can either enable this feature from first installation of Visual Studio or access it from the ‘Tools -> Get Tools and Features…’ menu item: Visual Studio Installer 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). This article will help you to do basic android application through visual studio. I'll put the link here below down. https://developer.okta.com/blog/2018/12/27/build-a-basic-android-app-with-xamarin-and-visual-studio
If you want to create an Android application using c# language you can use Xamarin. they created this great Cross Platform development tool which enables developers to develop iOS and Android apps in C# language. Xamarin is offered in different licenses from free to enterprise levels but for not I will be using the starter version which is the free version. It includes the Xamarin Studio which is great start for those who want to try out creating their first apps for Android, they also offer a Business license which lets you develop in Visual Studio so you can use that rich experience similar to developing Web Apps or Windows Apps, then they have this Enterprise which contains everything
You can use Visual Studio 2015 to building cross-platform apps for Android, iOS, and Windows. IDE: https://www.visualstudio.com/en-US/explore/cordova-vs Hope this will help!
Is it possible to use the Android SDK without using eclipse?
I'd like to develop for Android but I don't really like using an IDE for programming as I find them to be pretty cumbersome compared to a text editor and command console. Is there any way I can develop for Android without doing so in Eclipse, and instead using Gedit? The system requirements specified on the Android developers site list Eclipse as a requirement, but I Ewas wondering if anyone had found a way to manually tap into the SDK libraries outside of Eclipse. I'm using a Linux setup as my development box.
You do not have to use Eclipse, it's just highly recommended because the tools are nicely integrated : The recommended way to develop an Android application is to use Eclipse with the ADT plugin. The ADT plugin provides editing, building, debugging, and .apk packaging and signing functionality integrated right into the IDE. However, if you'd rather develop your application in another IDE, such as IntelliJ, or in a basic editor, such as Emacs, you can do that instead. The SDK includes all the tools you need to set up an Android project, build it, debug it and then package it for distribution. This document is your guide to using these tools. See this page on the Dev Guide for more info: Developing In Other IDEs
Yes you can do it with just the SDK and Ant (and the JDK of course). I'm doing it right now as an exercise in relearning Ant, and to make an 'idiot push button' procedure for a release build. I've got to say that it's slow going just trying to configure the build process on sources that I know will compile. I'm glad that I've got Eclipse for the rapid development in the debug phase.