- Xamarin Mobile Application Development for Android(Second Edition)
- Nilanchala Panigrahy
- 476字
- 2021-07-16 20:32:40
Speeding up the Android emulator
The default Android emulator that comes with the Android development toolkit is quite sluggish. It is often disappointing and painful to test an application in the Android device emulators. The wiser choice for developers is to have a real Android device to test on. However, because the Android ecosystem has various form factors and device manufactures, it is practically impossible to buy each targeted device to test the app. You have to go for some cost effective solution to test your app on all targeted devices.
The following section will guide you through some of the tips to make your Android emulator faster and other alternative options available to test Android apps.
Using the x86 emulator
Android provides an x86 emulator that can speed up the development considerably due to faster start and execution times for the AVD. The x86 emulator is not a part of the base Xamarin installation, but the directions for the installation can be found on the Xamarin website as well as the Android developer website. A very specific version may be required, particularly if you are using OS X Mavericks, so we will not replicate the directions here.
Once installed, you can take advantage of the x86 emulator by the selected Intel Atom (x86) for the CPU/ABI when editing an AVD configuration.
Third-party emulator solutions
The x86 solution should work just fine on the computer with a decent memory. Apart from the native Android emulators, you can use some of the third-party tools such as the Xamarin Android Player or Genymotion.
Xamarin recently announced its own Android emulator called the Xamarin Android Player. The Xamarin Player runs on Android x86 hardware accelerated virtualization and OpenGL 2.0 for fast booting and a smooth user interface. This works on both the Windows and Mac platforms. Your system requires to have an OpenGL 2.0 compatible graphics card with at least 2 GB hard disk space and at least 2 GB or RAM to install and run the Xamarin player.
The following screenshot shows the Xamarin Android Player with the player settings pane:

The Xamarin player settings pane allows you to simulate some of the emulator controls, such as battery life, geo locations, volume, and power control.
Genymotion is yet another alternative in the race of faster Android emulators. Genymotion is based on the open source project Android VM, developed by a French company Genymobile. It also works on all major platforms, including Mac, Windows, and Linux. The basic version of Genymotion is free to download; however, the commercial version does much more than the free version. The paid version of Genymotion can simulate multitouch, camera, GPS, network quality simulation, accelerometer, and much more. This can be the best alternative replacement for Android AVD.
The following screenshot shows the Xamarin Android Player on Mac OS:

- 現代C++編程:從入門到實踐
- Flutter開發實戰詳解
- PostgreSQL技術內幕:事務處理深度探索
- oreilly精品圖書:軟件開發者路線圖叢書(共8冊)
- CouchDB and PHP Web Development Beginner’s Guide
- AppInventor實踐教程:Android智能應用開發前傳
- 軟件測試實用教程
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- 從零開始學Linux編程
- ScratchJr趣味編程動手玩:讓孩子用編程講故事
- Python Interviews
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- 實戰Java高并發程序設計(第2版)
- Oracle 12c從入門到精通(視頻教學超值版)
- ASP.NET開發寶典