Modify Keymap
Modify frequently used shortcut keys
-
Code completion (eclipse:alt+/)
The default for Android studio is ctrl+space, which conflicts with IME switching, find Keymap->main menu->code->completion->basic, and change to alt+/
-
Fast error correction (ECLIPSE:CTRL+1)
Locate the Keymap->other->show Intention Action and change to Ctrl+1
-
Other useful shortcut keys
Quick Find Code application (CTRL+G)
Note (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)
Auto-import of associated jar packages
- Show Import Popup, which is used for editing XML, automatically pops up an import dialog box asking if you need to import.
-
Insert Imports on paste:(all ask None), which is actually an option for you to ask for an imported package when you copy the code.
All: When you choose this item, you paste the code, you need to import the package name, will automatically import, do not play the prompt box
Ask: When you choose this item, you paste the code, there is a need to import the package name, will pop the prompt box, ask you want to import
None: When you choose this, the code you paste, the package name that you need to import, does not play the prompt box, and does not automatically import.
-
Show Import Popup: This is different from the above insert imports on paste. Ha, don't mix, this means that when the declaration of the class you entered is not imported, a selection dialog box pops up. But this is a bit of a problem to note here. Whether you check or not, anyway, the dialog box will not pop out, after you lose the class name, the declaration is automatically imported. So I guess this could 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 importson the fly: This is the automatic import function, when you enter the class name, the declaration is automatically imported.
- Exclude from Import and completion: This is actually your custom Import. You don't have to pay attention, generally you can't use it.
Optimize Gradle
Cond
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
My Android Studio optimization path