Setup VMware for Developing Android Apps with Android Studio

29/12/2020
In this article, I am going to show you how to setup an Ubuntu 18.04 LTS virtual machine (VM) on VMware Workstation Pro for developing Android apps with Android Studio. So, let’s get started.

Requirements:

In order to follow this article, you must have,

  • A computer with at least 16 GB of RAM with Hardware virtualization (VT-d/VT-x/AMD-v) enabled.
  • VMware Workstation Pro installed on your computer.
  • Ubuntu 18.04 LTS ISO image file downloaded on your computer.
  • Internet connectivity.

Creating Virtual Machine:

First, open VMware Workstation Pro and go to File > New Virtual Machine…

Now, click on Next >.

Now, select I will install the operating system later and click on Next >.

Now, select Linux as the Guest operating system and Ubuntu 64-Bit as the Version.

Type in the name of the VM, select a location where the files will be saved and click on Next >.

Set VM disk size (I recommend 100 GB at least) and select Store virtual disk as a single file.

Now, click on Customize Hardware…

Now, set the Memory to 8GB (at least).

Now, assign at least 2 cores of your processor to the VM and enable the virtualization engine for the VM.

Now, click on Browse… from the CD/DVD (SATA) section to select an installation ISO image.

Now, select the Ubuntu 18.04 LTS ISO image file and click on Open.

The Ubuntu 18.04 LTS ISO image should be selected. Now, click on Close.

Now, click on Finish.

A new VM should be created.

Installing Ubuntu 18.04 LTS on VM:

Now, select the VM you just created and click on Power on this virtual machine.

The Ubuntu 18.04 LTS installer should start. Install Ubuntu 18.04 LTS as usual.

Installing Required Software Packages:

Once the Ubuntu 18.04 LTS operating system is installed on the VM, you have to install KVM and Open VM Tools.

First, update the APT package repository cache as follows:

$ sudo apt update

Now, install Open VM Tools as follows:

$ sudo apt install -y open-vm-tools-desktop

Now, install QEMU and KVM as follows:

$ sudo apt install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Now, add your login user to the kvm group as follows:

$ sudo usermod -aG kvm $(whoami)

Now, reboot your VM as follows:

$ reboot

Installing Android Studio on VM:

Once your VM starts, make sure the main, universe, restricted, multiverse repositories are enabled.

Now, open Ubuntu Software Center from the Application Launcher.

Now, search for android studio. Once you find it, click on it.

Now, click on Install.

Type in the password of your login user and click on Authenticate.

The installation should start. It will take a while to complete.

Once Android Studio is installed, click on Launch.

Click on OK.

Android Studio is starting as you can see.

You may or may not wish to share data with Google. It’s up to you.

Now, click on Next.

Now, click on Next.

Select your UI theme and click on Next.

Now, click on Next.

Click on Finish.

Android Studio will download and install Android SDK Tools. It will take a while to complete.

Now, click on Finish.

Android Studio should start. From now on, you can start Android Studio from the Application Launcher of Ubuntu 18.04 LTS.

Developing A Simple Android App on the VM:

In this section, I will run a create a new Android project, create an Android Virtual Device (AVD) and run a simple Hello World application on the AVD.

First, start Android Studio and click on Start a new Android Studio project to create a new Android project.

Select Empty Activity from the Phone and Tablet section and click on Next.

Select Empty Activity from the Phone and Tablet section and click on Next.

The project will take a while to be ready. Once the project is ready, click on Tools > AVD Manager.

Now, select a virtual device where you want to run your application for testing purpose and click on Next.

Now, click Download on the version of android you want to use for testing.

Now, select Accept and click on Next.

The Android System image should start downloading. It will take a while to complete.

Once the installation is complete, click on Finish.

Now, click on Next.

Now, click on Finish.

An Android Virtual Device (AVD) should be created. Now, close the window.

Now, click on Run > Run ‘app’

Select the AVD that you just created and click on OK.

As you can see, the Hello World app is running on the AVD.

So, that’s how you setup an Ubuntu 18.04 LTS VM on VMware Workstation Pro for developing Android apps with Android Studio. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Install VMWare Tools on Ubuntu

How to Install VMWare Tools on an Ubuntu Virtual Machine In this article I will show you how to install VMware Tools on...
28/12/2020

How to Install VMware Tools on CentOS/RHEL 8 VMware Virtual Machines

If you’re using VMware Player, VMware Workstation Pro, VMware ESXi or vSphere, then VMware Tools is a very important...
29/12/2020

VMWare vs VirtualBox

VMware and VirtualBox are both the top two popular desktop virtualization options. They are both supported on Windows,...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua proxy v4 chạy socks5 để chơi game an toàn, tốc độ cao ở đâu?
18/05/2024

Thuê mua proxy Telegram trọn gói, tốc độ cao, giá siêu hời
18/05/2024

Thuê mua proxy Viettel ở đâu uy tín, chất lượng và giá tốt? 
14/05/2024

Dịch vụ thuê mua proxy US UK uy tín, chất lượng số #1
13/05/2024

Thuê mua proxy Việt Nam: Báo giá & các thông tin MỚI NHẤT
13/05/2024