My Android Studio optimization path

Source: Internet
Author: User

Change Keymap

Change the shortcut keys you use frequently
    • Code completion (eclipse:alt+/)

      The default for Android studio is ctrl+space, which conflicts with IME switching. Find Keymap->main Menu->code->completion->basic. Change to alt+/

    • High-speed error correction (eclipse:ctrl+1)

      Find the Keymap->other->show Intention Action. Change to Ctrl+1

    • Other useful shortcut keys

      High-speed Lookup code application (CTRL+G)
      Gaze (ctrl+/)
      Global Lookup (CTRL+H)
      Global Search Class (CTRL+SHIFT+R)
      See who is referencing the method (CTRL+ALT+H)
      View using class/function descriptions (F2)
      View class inheritance Relationships (F4)
      Find recently opened files (ctrl+e)

Self-actively import the associated jar package

    • Show Import Popup . This is used when editing XML. Take the initiative to pop up an import dialog box and ask if you need to import it.

    • Insert imports on paste :(all Ask None), this is actually when you copy the code. An option for whether the imported package needs to be queried.

      all : When selecting this item. You paste the code, there is a need to import the package name, you will be actively import, do not play the prompt box
      ASK : Select this when you paste the code. When there is a need to import the package name. The pop-up box asks if you want to import
      None : The code you pasted when you chose this. When there is a need to import the package name. Does not play the prompt box, nor does it actively import itself.

    • Show Import Popup : This is a different item from the above insert imports on paste ha, do not mix together. This refers to when the declaration of the class you entered is not imported. A selection dialog box pops up. However, this option is actually a bit of a problem here.

      Whether you tick or not, anyway, the dialog box will not pop up, after you lose the class name, the declaration has been actively imported. So I expect this to be a bug in Android studio.

    • Optimize imports on Fly : This is actually the same as the shortcut key Ctrl+shift+o/ctrl+alt+o, which is to remove the unused declarations.
    • Add unambiguous imports on the fly : This is the self-initiated import function, when you enter the class name. The declaration was imported on its own initiative.
    • Exclude from Import and completion : This is the fact that you define Import yourself. Can not pay attention. Generally speaking, you can't use it.
Optimize Gradle
    • In Android Studio configuration, turn on offline mode
      -

    • Various optimizations at compile time

      compile independent modules in parallel (may require larger heap size): This means multi-threaded compilation of multiple modules
      Command-Line options: offline (offline Gradle)
      Do project automatically (only works and not running/degugging) voluntarily complete the project compilation?

      (It seems that I do not understand what the meaning of the hook)
      Configure on Demand configuration requirements

Many other optimization references

[Android Studio authoritative tutorial] Configure the "NB" for Android studio

My Android Studio optimization path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.