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

Setup VMware for Developing Android Apps with Android Studio

In this article, I am going to show you how to setup an Ubuntu 18.04 LTS virtual machine (VM) on VMware Workstation Pro...
29/12/2020

How to Install VMware Player 15 on CentOS 8

VMware Player is a free (for personal use only) type-2 hypervisor. It is basically a limited edition of VMware Workstation...
29/12/2020

Mounting VMware Shares from the Command Line on Linux VM

In this article, I am going to show you how to share a directory/folder to a VMware Virtual Machine (VM) and how to mount...
29/12/2020
Bài Viết

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

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024