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 in studio.vmoptions
:
-Xms512m -Xmx6000m -XX:MaxPermSize=1000m -XX:ReservedCodeCacheSize=500m -XX:+UseCompressedOops
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?
If Android Studio has a proxy server setting and can't reach the server then it takes a long time to build, probably its trying to reach the proxy server and waiting for a timeout. When I removed the proxy server setting its working fine.
Is the MacBook Air good for Android and iOS development? Yes it is. To develop android apps the most used platform is the android studio in which you code in Java and xml. Fortunately, it is available both for the windows PC and the Mac.
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.
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 button
Restart Android Studio and that's it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With