Android Studio useful shortcuts

These are based on the default IntelliJ shortcut map. You can switch to other common IDE shortcut maps via File -> Settings -> Keymap -> <Choose Eclipse/Visual Studio/etc from Keymaps dropdown>

Action

Shortcut

Format code

CTRL + ALT + L

Add unimplemented methods

CTRL + I

Show logcat

ALT + 6

Build

CTRL + F9

Build and Run

CTRL + F10

Find

CTRL + F

Find in project

CTRL+SHIFT + F

Find and replace

CTRL + R

Find and replace in project

CTRL + SHIFT + R

Override methods

CTRL + O

Show project

ALT + 1

Hide project - logcat

SHIFT + ESC

Collapse all

CTRL + SHIFT + NumPad +

View Debug Points

CTRL + SHIFT + F8

Expand all

CTRL + SHIFT + NumPad -

Open Settings

ALT + s

Select Target (open current file in Project view)

ALT + F1 → ENTER

Search Everywhere

SHIFT → SHIFT (Double shift)

Code | Surround With

CTRL → ALT + T

Create method form selected code

ALT + CTRL

Refactor:

Action

Shortcut

Refactor This (menu/picker for all applicable refactor actions of the current element)

Mac CTRL + T - Win/Linux CTRL + ALT + T

Rename

SHIFT + F6

Extract Method

Mac CMD + ALT + M - Win/Linux CTRL + ALT + M

Extract Parameter

Mac CMD + ALT + P - Win/Linux CTRL + ALT + P

Extract Variable

Mac CMD + ALT + V - Win/Linux CTRL + ALT + V

Create assets folder

Right click in MAIN folder > New > Folder > Assets Folder.

Assets folder will be under MAIN folder with the same symbol as RES folder.

In this example I put a font file.

Create filters configuration

Custom filters can be set and save from the UI. In the AndroidMonitor tab, click on the right dropdown (must contains Show only selected application or No filters) and select Edit filter configuration.

Enter the filter you want

And use it (you can selected it from the same dropdown)

Important If you add an input in the filter bar, android studio will consider both your filter and your input.

Gradle build project takes forever

View And Add Shortcuts in Android Studio

By going to Settings >> Keymap A window will popup showing All the Editor Actions with the their name and shortcuts. Some of the Editor Actions do not have shortcuts. So right click on that and add a new shortcut to that.
Check the image below

This modified text is an extract of the original Stack Overflow Documentation created by following contributors and released under CC BY-SA 3.0