Testing on multiple mobile devices is costly, time consuming and the default Android emulator is notoriously slow. So, what should we do? That's easy - start using a properly fast Android emulator.
Don’t forget to bookmark android tablet emulator is slow using Ctrl + D (PC) or Command + D (macos). If you are using mobile phone, you could also use menu drawer from browser. Whether it’s Windows, Mac, iOs or Android, you will be able to download the images using download button. Android Studio Emulator is a smart and compatible android emulator that allows you to do advanced code completion, code. On PC, Mac, and tablets with.
When developing Android applications, you have to keep in mind all the different Android OS versions and various screen sizes and resolutions. The main objective before releasing an application is to find bugs and design imperfections.
Default Android emulator
The great thing about using an emulator for development is that it gives you an opportunity to develop applications without having a real Android device. The default Android emulator comes together with the Android SDK and can be found in the 'tools' folder.
So far so good, we have our cake, but can we eat it? The answer comes about 5 minutes after we hit the 'Launch' button. Go grab a coffee. Have breakfast. Come back. Wait another 5 minutes. Maybe even more.
Finally - the emulator launches, only to show how slow it actually is.
All these performance problems stem from the fact that it emulates an ARM processor so it can run the actual code of your application. It accomplishes that by providing dynamic binary translation of the device machine code to the OS and processor architecture of your development machine.
Basically, it does a lot of mumbo-jumbo to pretend it's an ARM processor - when actually it isn't.
OK, it's slow. So what can we do about it?
- Well, first, we can help our CPU out by delegating the rendering process to the GPU by checking 'Use Host GPU' checkbox in AVD's edit window. The screen should now look better and be more responsive. That's because the CPU is not dealing with the tedious work of doing rendering anymore. But, that's still not fast enough.
- We can download Intel Atom (x86) images and, while we're at it, download Intel x86 Emulator Accelerator (HAXM, for Mac and Windows only). This will enable virtual machine acceleration capabilities of the Intel CPU (for more information check this link).
Now we're getting somewhere, once this baby starts up, it should run fast and smooth.
You could say that this level of speed should be sufficient. That may be true, but an issue with the Intel x86 images is that you don't get Google Apps, they only come with ARM images. This is important if you're testing an app that uses GMaps, or Google Play Services.
So, as we've seen, ARM images aren't fast enough even with hardware acceleration. And emulators don't have the Play Store. What now?
Genymotion by Genymobile
Genymotion is a new, fast Android emulator developed by the French company Genymobile. It's based on the open-source project AndroVM, and the first beta version was released back in June.
It runs on all major platforms (Mac, Windows, Linux). For now it's freely available, but there is also going to be a paid version.
According to AndroVM blog, the free version will be feature-rich, and the paid version will be intended for large companies needing a higher level of collaboration on Genymotion.
How to use it?
Genymotion relies on Oracle VirtualBox to work (version 4.1 or above). So..
Download and install VirtualBox. For Windows users it's not necessary to install VirtualBox separately, because it is available from the Genymotion site, bundled with the Genymotion emulator.
Go to Genymotion website and sign up. You'll receive a validation mail, so just click on the validation link to proceed.
Download and install the Genymotion emulator (the current version is 1.1.0).
Start Genymotion. You might need to configure path to your Android SDK location in Genymotion settings (probably if you've installed SDK in a non default location). Since this is a first start, there are no devices. Click on 'Add' and download new device. To see available devices, write your credentials in the pop-up dialog and click 'Connect'.
Select the device and click 'Start'.
It starts quickly and is insanely fast! It's a little awkward to start the emulator separately, but Genymotion provides Eclipse and Android Studio integration through plugins, also available on Genymotion website. To use the plugin, you have to provide a path to Genymotion installation and Android SDK, as well.
OK, it's fast. Is that it?
Well, for me, the sheer speed of Genymotion is what got me using it in the first place. Which is kind of funny, because in the first version you couldn't even rotate the device.
But, alongside the speed bump, it also provides GPS, compass and battery control via some good-looking widgets.
Battery control widget
The GPS widget even provides GMaps for selecting mock locations, which is really nice for testing location based apps.
Device angle control and Play Store
Through the Genymotion shell it's also possible to control the device's angle (accelerometer), but it would be cool to control it using a widget, something like the Windows phone emulator does.
Genymotion devices with Google Apps also come with the Play Store preinstalled. This comes in handy if you want to test an app from the Play Store quickly.
Multiple screen sizes
Multiple screen sizes are one of Android developer's worst nightmares. There is a huge number of different screen configurations of Android devices.
Genymotion, as well as the default emulator, offers custom configuration of device's screen. In the list of available devices, select the device for which you want to change screen configuration and click on the monitor icon on the right side. Then simply select one of the predefined screen resolutions or create your own.
Be careful when choosing resolution, because you may end up with something rather strange…
Where it comes short
The main setback of Genymotion is that it only provides devices with API version 16, 17 and a preview version of Android 4.3 (API 18). If we take a look at Google Dashboard, we'll see that Gingerbread still holds about 33% of all devices (API 10).
So, for testing on that platform you still need either a default emulator or real device, which kind of defeats the purpose of Genymotion as a testing platform.
And there is no camera, which I don't miss, but could be really useful.
In the future, we can expect even more features, like taking screenshots or video screen capturing (which would be great for making demonstration videos). An accelerometer widget would be cool, and even a camera would be nice, but we can only wait and see.
Final thoughts
Well, you can never really get rid of real devices, because you'll always want to test an app on a real device before releasing it. But during development I recommend using a Genymotion emulator. Even though it doesn't cover all major Android OS versions. It's fast, stable, the GPS sensor manipulation is awesome and with the device rotation feature added to the 1.1.0 version - it's truly the way to go.
Also, deploying apps is almost instant and that can save you a lot of time when you're doing small changes to the app. But you have to watch out since the Genymotion emulator runs faster than real devices themselves, giving you a false impression of the performance of the app.
Always test on a real device!
Like this article? Sign up for our monthly newsletter and never miss any of them.
Question or issue on macOS:
I am trying to develop some native Android apps using Android Studio (latest) on OS X Yosemite. Currently Android Studio is simply unusable: it is too slow. I am not referring to the Android emulator, which was doubling the development time, but to the source code editor itself.
The main problem is that very often but not always (I would say almost always) it is not able to keep the pace of my editing: when I edit text, characters appear on the screen between one and two seconds later. If I delete characters, I never know which one I reached without waiting for a couple of seconds. If I right-click I wait for the equivalent of geological ages before something is displayed. It is almost impossible to use the graphical layout editor because it is sloooow.
I have also other problems, related to incredible bugs. But I want to focus on this basic functionality.
After a bit of research I ended up increasing its heap space. So I went into:
/Applications/Android Studio.app/Contents/bin
and modified these values:
Actually I have only increased the allocated memory for the first two of them.
Is there anyone developing for Android on a Mac who was able to increase this basic performance of Android Studio? Is there any hidden trick, combination of JVM and options able to make this app usable?
I am working on a MBP 2.3GHz i7 with 16GB of RAM: is it enough?
How to solve this problem?
Solution no. 1:
I did the following to resolve the Android Studio slowness.
Go to Android -> Preferences -> Build, Execution, Deployment -> Compiler
Check the Option –
Compile independent modules in parallel (may require larger heap size)
Set VM Options to :
-Xmx2048m -XX:MaxPermSize=512
Restart Android Studio.
Solution no. 2:
After understanding of @Benjamin and @Marco Hc, I captured a screenshot and tried to represent the solution graphically. Every number in the picture represents the flow of the solution:
Go to Android -> Preferences
Click on Build, Execution, Deployment
Click on -> Compiler
Check the Option – Compile independent
modules in parallel (may require larger heap size)Check on Use in-process
build” and “Configuration on demand and click OK buttonRestart Android Studio and that’s it.
Solution no. 3:
It’s more than enough, there are some tricks to improve your Android Studio performance:
Activate gradle deamon: https://www.timroes.de/2013/09/12/speed-up-gradle/
Activate Compiler features: Settings -> Compiler, then activate “Compiler independent…”, “Use in-process build” and “Configuration on demand”.
With these two tricks you’ll feel the difference. Let me know.
Cheers!
Solution no. 4:
Yes, that is enough computer. I use Android Studio on both my Mid 2011 iMac and my MBP 2.5GHz i7. Android Studio and the emulator are pretty slow to load on the iMac, but I do not have the issues while typing that you describe on either machine.
What version of Android Studio are you using?
Solution no. 5:
In my case, I saw that only Android Studio was laggy (problems while typing or using the mouse). The other apps were ok.
I had a look to “activity monitor” and saw in the “processor” and “memory” tabs that some apps regularly induced peaks on the processor graph or memory graph. You can also see that these apps move a lot in the listing (going up and down) during the peaks.
I noticed that the apps inducing peaks were:
Android Studio Emulator Slow Mac Air
- “Kies” app by Samsung : I removed it from the apps launched at startup and deleted this crap app
- “CrashPlan” (a backup app): I launched the app and logged into it (it was not logged in)
- I desactivated Apple speech recognition in my Mac settings (a process named “applespeechrecognition” or something like that)
My Mac is now much faster and have no more problems with Android Studio ! 🙂
Android Studio Emulator Slow Mac Download
Solution no. 6:
Something I discovered was having Dictation turned on for the keyboard in System Preferences seems to cause a general loss of action (keyboard entry was dropping characters, clicks seemingly being dropped, window moves not working, etc.).
Disabling dictation cured all my general UI performance issues. This was done through Apple Menu | System Preferences | Keyboard | Dictation Tab | Off
Solution no. 7:
Easy way shared by Jake Wharton
Nox Player
First, click on Android Studio -> Preferences -> Plugins
Ark survival evolved unlock hairstyles cheat. Now, disable or check off all the plugins which not usable for you.
Best Emulators For Mac Android
- Android APK Support
- Android Games
- Android NDK
- App Links Assistant
- Copyright
- Coverage
- CVS Integeration
- Editor Config
- Fabric for Android Studio
- Firebase (App Indexing, Services, Testing)
- Github
- Google (Cloud Tools Core, Cloud Tools for Android, Developer Samples, Login, Services)
- Markdown Support
- Mercurial integration
- Settings repository
- Subversion integration
- Task management
- Test recorder
- TestNG-J
- YAML
Android Emulator For Slow Computers
Now, click Apply -> OK
If you need any plugin later, enable it for a temporary time, do your work and then you can disable it again.
Solution no. 8:
This performance issue may be caused by a cloud backup utility like Google Backup & Sync, iCloud, DropBox, or OneDrive syncing the folder or files as you edit. Try disabling the Cloud Backup daemon or removing those files from sync.