Some thoughts on using Android Studio with Genymotion emulator
This article is a summary of the problems I encountered when configuring the Genymotion emulator:
- emulator fails to start
- Android Studio associated with Genymotion
- Can start emulator but can't install app
- Drag to load Genymotion-ARM-Translation.zip failed
About the download and installation of Genymotion
Not much to say, I downloaded the version with VirtualBox directly from the official website and installed it directly, but note that VirtualBox and Genymotion need to be installed on the same drive disk, otherwise there may be problems, download address: Genymotion , you need to register an account first
emulator fails to start
After installation, open Genymotion. The first time you use it, you need to set it up. Open setting->ADB, select Use Custom Android SDK Tools and select your Android SDK directory (if you don't do this setting, it may cause the emulator to fail to start)
After that, you can exit the setting, click New, and select an emulator. In the next step, an overview of the emulator will appear. Continue, the download will be carried out at this time, but the download speed is very slow. At this time, you can close the download after the Downloading files appear again.
Open the C:\Users\Administrator\AppData\Local\Genymobile folder on the computer and check the genymotion.log file, you can see a link like this at the bottom
Copy it to the download tool to download. After the download is complete, copy the file with the .ova suffix to the C:\Users\Administrator\AppData\Local\Genymobile\Genymotion\ova folder
At this time, you can reopen Genymotion, click New, and re-select your previous emulator. The configuration will be completed soon, and then a bootable emulator will appear in your list.
Android Studio associated with Genymotion
Open Android Studio, File–>setting–>Plugins, search for Genymotion and install it, then restart Android Studio, you will see such an icon
Click to configure the location of the Genymotion folder, you can see it after the configuration is complete
Can start emulator but can't install app
At this time, although the settings have been completed, you may find that your emulator can be started, but your application may not be installed. This is because the Genymotion virtual machine is based on the x86 architecture. At this time, you need to add arm support to the emulator. , I'll add supporting documents at the end of the article later. Normally, drag the file directly into the virtual machine interface and click ok. But I don't know why it keeps failing when I set it up. Like this
but looking at the file system of the virtual machine you will find that the Genymotion-ARM-Translation.zip file is already there in the download folder, so I decided to use the ADB command to do the job after consulting some tech blogs, the process Just like the picture above.
Simply put, open the virtual machine, then open the command line tool, locate the platform-tools directory in the AndroidSDK you set, and execute the adb command sh /system/bin/flash-archive.sh /sdcard/Download/ Genymotion-ARM-Translation_v1.2.zip replace the bold part with the filename of your zip file
So the problem with Android Studio and Genymotion is probably these, the following is the download address of the Genymotion-ARM-Translation.zip file: Genymotion-ARM-Translation