Open In App

Guide to Install and Setup Visual Studio for Android App Development

Last Updated : 10 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To start developing Android applications, one has to set up a proper development environment. It facilitates developers to use the tools needed in creating an app and ensure that all operations/processes carried out in a smooth manner. An IDE(Integrated Development Environment) is a complete application suite that provides services like writing and editing of source code, building executable files, and debugging. Visual Studio is one of the popular IDE that is used for developing cross-platform mobile applications. Both Android and iOS mobile applications can be developed using this IDE. This article covers the step-by-step approach to install and set up the Visual Studio on the computer system in order to start the android app development journey.

How to install and setup Visual Studio for Android Development ?

Step 1: Download the Visual Studio file from the official website

Visit the official Microsoft website for Visual Studio . The Community version of the IDE is free to use. Download the .exe file and run it on your computer.

vs-studio-(1)-(1)

visual studio installation guide

Step 2: Choose appropriate Workloads

When opening the .exe file of Visual Studio, you’ll be prompted to select Workloads. Workloads determine the usage of the IDE, i.e., what type of development you’ll be doing. Select Mobile Development with .NET. If the Android SDK is not already installed on your computer, also select the checkbox for it on the right-hand side. Click on Install.

vs-studio2

visual studio installation guide

Step 3: System Reboot

Once all files get downloaded and installed, the Visual Studio will demand to reboot the system. As this step is crucial for the smooth installation of software, click on OK.

vs-studio3

Step 4: Log in to your Microsoft account

One needs to login with a Microsoft account in order to use Visual Studio. Log in if already created, otherwise create one for the same. Select the desired color theme and click on “Start Visual Studio”.

vs-studio4

Step 5: Create a new Project

In the next dialog box, click on “Create a new project” option. It will open a window to choose project type and platform for preferred development. Select “Mobile” in the dropdown menu of Project type and select .NET MAUI Multi Project App from the given list. 

vs-studio5-(1)

vs-studio6

Step 6: Configure the Project

Give the desired name and location to the project and click on “Create”. In the next dialog box, choose a blank template for the application and click on “Create”.

vs-studio7

Step 7: Project files

Open the MainActivity file of the application by clicking on the MainActivity.cs file under the Android heading at the right side menu. Similarly, to open the XML layout file of the application, click on MainPage.xaml file present in the right menu.

Step 8: Configure Virtual Device(Emulator)

Emulators run the android applications on the computer system i.e., developers don’t need a real android device to run/test the applications. To set up an Emulator, open the Android Device Manager. Choose the default setting and click on “Create”.     

The device name will now appear in the Android Device Manager list. Click on the Run button of the device(present in the rightmost column of the manager) to launch the device as an emulator.

If someone has used any Android development IDE like IntelliJ IDEA or Android Studio and had installed an Emulator device earlier and that device name and configuration will appear in the list of Android Device Manager. Navigate to the Tools menu at the top and open Android -> Android SDK Manager. Make sure that the target API of the device is installed in the Visual Studio IDE, if not then install the SDK platform mentioned under the OS version of the device.

Step 9: Run the application

Once the emulator has been configured successfully, the device name will appear beside the Run icon present on the toolbar of the IDE. Click on the Run icon and the application will be launched on the Emulator.   



Next Article

Similar Reads