Android Studio Performance

Android Studio Performance

Why Android Studio is very slow ?

  • If Android Studio is running on a machine with less than the recommended specifications, it will be very slow and will obstruct your progress. For most machines the recommended specifications are 8 GB RAM, 4 GB of available disk space(if you are using emulator system image) and 1280 x 800 minimum screen resolution.

What can I do to increase Android Studio performance ?

  1. Reduce the maximum heap size available to Android Studio: By default, maximum heap size is 1280 MB, change it to 512 MB. Click Help > Edit Custom VM Options to open your studio.vmoptions file.
  2. Update Gradle and the Android plugin for Gradle: Try to use the latest version.
  3. Turn on Offline Mode for Gradle: (When limited bandwidth), but it will issue a failure if you are missing any dependencies instead of download them.
  4. Enable Power Save Mode: To turn off some background operations like error highlighting and on-the-fly inspections, auto-popup code completion, and automatic incremental background compilation. Click File > Power Save Mode.
  5. Disable unnecessary lint checks: Lint can help you clean up some issues like unused namespaces, deprecated elements or API calls that are not supported by the target API versions. To disable that go to settings (Preference on macOS or File -> settings) -> Editor -> Inspection.
  6. Debug on a physical device: Avoid using emulators.
  7. Include only necessary Google Play services as dependencies: Specify which service you want to use and ignore unnecessary things to clean up you resources including memory.
  8. Reduce the maximum heap size available to Gradle: Maximum heap size by default is 1,536 MB. You can reduce this value(to an example 800 MB) by overriding org.gradle.jvmargs in the gradle.properties file.
  9. Do not enable parallel compilation: You can compile independent modules in parallel but avoid it if you have low-memory system. To disable that go to settings (Preference on macOS or File -> settings) -> Build, Execution, Deployment -> Compiler -> disable Compile independent modules in parallel .
  10. If all of this not working please increase your resources a little bit :D .

Some of these steps you have to restart Android Studio to take effect.

References:-

Android Studio Requirements

Android Studio Configuration

Customize VM Options

Lint Checks

要查看或添加评论,请登录

社区洞察

其他会员也浏览了