In this post, we will learn how to run or debug android app using Genymotion emulator in android studio. We will see how to install Genymotion, all the features provided by Genymotion emulator in android emulator etc.
Have you used default android emulator provided in android studio?
If you are using –
Is it lagging ?
Have you ever felt it a bit slower ?
If you are using default android emulator provided in android studio, probably you have faced these problems. It’s a bit slower. Also, it lags far behind than actual android device.
These problems in default emulator leads android developer to look for alternate option – Genymotion Emulator.
Genymotion emulator is faster than default emulator, provides varieties of virtual devices. It has simple interface and can be started within android studio IDE after we install it’s plugin. It uses ADB to connect to any active virtual device and push the application.
So, in this post, we will learn how to install and setup this Genymotion emulator.
Follow steps below to download –
Click on below link to visit official link to download Genymotion.
Based on your system configuration, click on download link provided. For example, If you want to install Genymotion in Linux, Click on Download For Linux link. If you want to install Genymotion in Windows, there are two versions available –
- Download For Windows (Without VirtualBox)
- Download For Windows (With VirtualBox)
Similarly, For Mac OS, click on Download For macOS link.
In this tutorial, we are using macOS, So, we will download Genymotion for macOS.
Note: Based on your internet speed, it may take upto several minutes.
After downloading Genymotion, we need to install it now. Follow steps below
- Goto folder where Genymotion is downloaded. Click on .dmg file. It opens window similar as below –
Select both Genymotion and Genymotion Shell. Then, move them to Applications folder. Check below video for reference –
After moving Genymotion and Genymotion Shell to Applications folder, a warning popup automatically popups like below –
This is because we have prohibited app to be installed if it is not downloaded from App store.
How to solve it?
You need to Allow app to be opened in System Preferences. Open System Preferences. Then, find and click on Security & Privacy. In General tab, you will see screen like below –
Select “App Store and Identified developers” if you want to allow app to be opened for identified developers too. Otherwise, click on Open Anyway. It will ask for confirmation message if you want to open Genymotion or not. Click on Open.
After clicking on Open button, Genymotion starts opening. But,
We get below error –
It’s asking to install VirtualBox.
We have installed Genymotion in our system. But, we need VirtualBox to be installed in our system if we want Genymotion to be working properly. So, now, we will install VirtualBox.
First question is – Which version of VirtualBox is to be installed?
To get answer – Check the requirements specified in Genymotion.
Note that mentioned version is – 6.1.16
So, we will download virtual-box 6.1.16 now.
Click on below link to download required version –
After downloading specified version, follow steps below to install VirtualBox
Click on the downloaded file. It opens window same as below –
As shown above in image, there are two steps we have to perform. So, let’s proceed ahead with first step –
Double click on VirtualBox.pkg file. It opens below popup –
Click on Allow. Then, below window will be shown –
Click on continue button.
- Clicking on continue button redirects to below screen –
Leave all details as default. Click on install button.
- Clicking on install button starts installing VirtualBox. Now, we need to wait for few minutes.
Finally, successful installation message will be shown like below –
Click on close button.
VirtualBox has been successfully installed in system.
Now, we will be back to our Genymotion part.
Genymotion: Install Devices
Open Genymotion again. We won’t get any error now. Screen similar as below will be opened –
Note that there is no virtual device added as of now. So, we will add some now.
Click on + icon to add virtual device. Then, follow step below to create virtual device –
Clicking on + icon opens another popup to select virtual device to be added.
Here, we have selected first device. Now, Click on NEXT button.
Clicking on NEXT shows next screen to select configuration details –
Modify default details if you want to change anything. For the sake of simplicity of this post, we have kept it as it is. Now, click on INSTALL button.
Now, downloading of selected device will be started –
- After installation device list will be shown in same window.
Click on three dots (shown at right-most with each device details row)
Clicking on three dots opens popup as below –
Click on Start to launch any virtual device.
- Finally launched device will look like below –
- Thus, we have installed Genymotion devices successfully
Now, next step is to link this Genymotion with our Android Studio IDE so that it can be launched from Android Studio IDE itself. For this we need to open Android Studio IDE first.
Link Genymotion With Android Studio IDE Using Plugin
Open android studio IDE and follow below steps –
Open Preferences => Plugins. Then, select Marketplace tab and search for “Genymotion”. Screen like below will be visible –
Click on install button.
- After installation, screen like below will be visible –
Click on OK button now.
- Clicking on OK button refresh Android Studio IDE for some minutes. Then, an icon for Genymotion is added in IDE. It looks like below –
Click on this Genymotion icon now.
It open new window asking the path where we have installed Genymotion. So, select Genymotion installation path now –
Click on OK button after path selection.
- Click on Genymotion icon in IDE again. It opens Genymotion Device Manager as below –
Using this Genymotion Device Manager, we can manage virtual devices. If we want to launch any device, select that device and click on Start. Similarly, we can perform other operations as well. For example, If we want to add new device, click on New button.
Thus, we successfully installed Genymotion in our system. Then, we integrated Genymotion with our Android Studio IDE so that it can be launched from there as well. Now, we will launch any virtual device and run Our HelloWorld App in it.
Run Android App in Genymotion Emulator
We have already launched Genymotion Device Manager. Now, follow steps below to run android App (HelloWorld) in Genymotion emulator –
Select Custom Phone from the device list shown. Then, click on Start button.
Finally, Virtual Device (Custom Phone) will be launched.
- Open HelloWorld App, if not opened.
- Then, click on run icon in Android Studio IDE. Finally, app will be launched in Genymotion emulator.
You must be logged in to post a comment.