Useful Android Studio Shortcuts to Increase Your Productivity

Remembering and using shortcuts frequently will reduce your work time a lot, esp. for repetitive tasks. Following are the most useful shortcuts/hotkeys in Android Studio:

Editor

  • Alt + Left / Right: Switch to previous / next tab
  • Ctrl + Alt + Left / Right: Reversed version of Alt + Left / Right
  • Ctrl +Left / Right: Navigate within code word-by-word
  • F2: Go to next syntax error
  • Ctrl + F4 : Close tab. I personally don’t use this because I’m too familiar with Alt+F4 to close anything in Windows.

Search and Replace

  • Double Shift: Multi-purpose searching. I use this shortcut a lot to search for files in res folder
  • Ctrl + F : Find string in current file
  • Ctrl + R : Find and replace string in current file
  • Ctrl + Shift + F : Find string in project files

Code / Comment

  • Ctrl + D : Duplicate current line of code
  • Ctrl + Y : Remove current line of code
  • Ctrl + + / – : Expand / collapse code block
  • Alt + Shift + Left Click: Place an extra cursor.
  • Ctrl + Left Click: Go to Class file of clicked object, method or property.
  • Ctrl + / : Comment / uncomment a line of code
  • Ctrl + Shift + / : Comment / uncomment a block of code
  • Ctrl + Alt + L : Reformat code
  • Shift + F6: Refactor name replacing. This can be used in project view and code lines
  • Ctrl + Alt + O: Optimize imports. It basically removes unused imports.

Build/Debug

  • Shift + F10 : Run selected build
  • Shift + F9 : Debug selected build
  • Ctrl + F2 : Stop build

Leave a Comment

Your email address will not be published. Required fields are marked *

We care about your privacy and data security. Google serves cookies to analyse traffic and show ads on this site. By using this site you agree to these cookies being set. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close