How to speed up Android Studio on a Mac

前端 未结 8 2099
感情败类
感情败类 2020-12-13 10:00

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 referri

相关标签:
8条回答
  • 2020-12-13 10:06

    Easy way shared by Jake Wharton

    First, click on Android Studio -> Preferences -> Plugins

    Now, disable or check off all the plugins which not usable for you.

    • 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

    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.

    0 讨论(0)
  • 2020-12-13 10:07

    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.

    0 讨论(0)
  • 2020-12-13 10:17

    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!

    0 讨论(0)
  • 2020-12-13 10:20

    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:

    1. Go to Android -> Preferences

    2. Click on Build, Execution, Deployment

    3. Click on -> Compiler

    4. Check the Option - Compile independent modules in parallel (may require larger heap size)

    5. Check on Use in-process build" and "Configuration on demand and click OK button

    6. Restart Android Studio and that's it.

    0 讨论(0)
  • 2020-12-13 10:22

    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

    0 讨论(0)
  • 2020-12-13 10:23

    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.

    0 讨论(0)
提交回复
热议问题