The Ultimate Android Studio Shortcuts Cheat Sheet: Boost Your Development Speed

Introduction

Android Studio is the official integrated development environment (IDE) for Android app development. Mastering its keyboard shortcuts can dramatically improve your productivity by reducing the time spent on repetitive tasks and navigation. This comprehensive cheat sheet compiles the most useful shortcuts to help both beginners and experienced developers work more efficiently.

General Shortcuts

ActionWindows/LinuxmacOS
Save all filesCtrl+S⌘S
Settings/PreferencesCtrl+Alt+S⌘,
Project structureCtrl+Alt+Shift+S⌘;
Build projectCtrl+F9⌘F9
Run appShift+F10^R
Debug appShift+F9^D
Stop appCtrl+F2⌘F2
Recent filesCtrl+E⌘E
Quick documentationCtrl+QF1 or ⌃J
Find actionCtrl+Shift+A⌘⇧A

Code Navigation

ActionWindows/LinuxmacOS
Go to classCtrl+N⌘O
Go to fileCtrl+Shift+N⌘⇧O
Go to symbolCtrl+Alt+Shift+N⌘⌥O
Go to lineCtrl+G⌘L
Navigate back/forwardCtrl+Alt+Left/Right⌘⌥←/→
Next/previous methodAlt+Up/Down⌃Up/Down
Jump to sourceF4 or Ctrl+EnterF4 or ⌘↓
Find usagesAlt+F7⌥F7
Navigate to declarationCtrl+B⌘B
Show implementationCtrl+Alt+B⌘⌥B

Code Editing

ActionWindows/LinuxmacOS
Basic code completionCtrl+Space^Space
Smart code completionCtrl+Shift+Space⌃⇧Space
Complete statementCtrl+Shift+Enter⌘⇧Enter
Parameter infoCtrl+P⌘P
Quick fix / Show intention actionsAlt+Enter⌥Enter
Reformat codeCtrl+Alt+L⌘⌥L
Auto-indent linesCtrl+Alt+I⌃⌥I
Duplicate line/selectionCtrl+D⌘D
Delete lineCtrl+Y⌘⌫
Comment/uncomment lineCtrl+/⌘/
Comment/uncomment blockCtrl+Shift+/⌘⌥/
Select increasingly larger code blocksCtrl+W⌥↑
Shrink selectionCtrl+Shift+W⌥↓

Refactoring

ActionWindows/LinuxmacOS
RenameShift+F6⇧F6
Extract methodCtrl+Alt+M⌘⌥M
Extract variableCtrl+Alt+V⌘⌥V
Extract fieldCtrl+Alt+F⌘⌥F
Extract constantCtrl+Alt+C⌘⌥C
Extract parameterCtrl+Alt+P⌘⌥P
InlineCtrl+Alt+N⌘⌥N
Refactor thisCtrl+Alt+Shift+T^T

Debugging

ActionWindows/LinuxmacOS
Toggle breakpointCtrl+F8⌘F8
View breakpointsCtrl+Shift+F8⌘⇧F8
Step overF8F8
Step intoF7F7
Smart step intoShift+F7⇧F7
Step outShift+F8⇧F8
Resume programF9⌘⌥R
Evaluate expressionAlt+F8⌥F8
Run to cursorAlt+F9⌥F9

Version Control

ActionWindows/LinuxmacOS
Commit changesCtrl+K⌘K
Update projectCtrl+T⌘T
Push commitsCtrl+Shift+K⌘⇧K
Show VCS operationsAlt+` (backtick)^V
Show diffCtrl+D⌘D
VCS quick popupAlt+BackQuote^V
RevertAlt+Shift+Z⌘⌥Z

Layout and Views

ActionWindows/LinuxmacOS
Toggle Project viewAlt+1⌘1
Toggle LogcatAlt+6⌘6
Toggle TerminalAlt+F12⌥F12
Toggle FavoritesAlt+2⌘2
Hide all tool windowsCtrl+Shift+F12⌘⇧F12
Maximize/restore editorCtrl+Shift+F12⌘⇧F12
Split vertically/horizontallyCtrl+(or Shift+)\⌘(or ⌥+)\
Next/previous tabAlt+Right/Left^→/←
Close active tabCtrl+F4⌘W

Layout Editor Shortcuts

ActionWindows/LinuxmacOS
Toggle between Design/Text viewsCtrl+Shift+G⌃⌘G
Toggle component treeAlt+Shift+G⌃⌘]
Zoom inCtrl+Plus⌘+
Zoom outCtrl+Minus⌘-
Fit to screenCtrl+0⌘0
Toggle device orientationCtrl+Alt+R⌘⌥R
Select parentCtrl+Up⌘↑
Select next componentTabTab
Select previous componentShift+Tab⇧Tab

Emulator Shortcuts

ActionWindows/Linux/macOS
Home buttonHome
Back buttonEscape
Menu buttonF2 or Page Up
Recent appsF1 or Page Down
Volume up/downF3/F4
Rotate screenCtrl+F11 or Ctrl+F12
Power buttonF7
Take screenshotCtrl+S
Enter textTab to select field, then type

Common Challenges and Solutions

Challenge: Slow Emulator Performance

  • Solution:
    • Use hardware acceleration (HAXM or KVM)
    • Reduce emulator RAM allocation
    • Use physical device instead of emulator
    • Try a lighter emulator like Genymotion

Challenge: IDE Freezing or High CPU Usage

  • Solution:
    • Increase memory allocation in studio.vmoptions
    • Disable unused plugins
    • Clean and rebuild project
    • Invalidate caches (File > Invalidate Caches / Restart)

Challenge: Missing Shortcuts

  • Solution:
    • Check for keyboard conflicts with OS or other applications
    • Restore default keymap (Settings > Keymap > Restore Defaults)
    • Create custom keymaps for frequently used actions

Challenge: XML Layout Editing Frustrations

  • Solution:
    • Toggle between Design and Code views (Ctrl+Shift+G)
    • Use “Preview All Screen Sizes” feature
    • Learn ConstraintLayout specific shortcuts
    • Use Component Tree for complex hierarchies

Best Practices and Tips

  1. Customize Your Shortcuts: Create custom shortcuts for your most frequently used actions in Settings > Keymap.

  2. Learn Incrementally: Focus on learning 3-5 new shortcuts per week rather than trying to memorize them all at once.

  3. Use the Search Everywhere Feature (Double-tap Shift): This powerful search helps you find anything within your project or the IDE.

  4. Create Live Templates: For frequently typed code patterns (Settings > Editor > Live Templates).

  5. Utilize Multiple Clipboards: Use Ctrl+Shift+V (⌘⇧V) to access clipboard history.

  6. Leverage Code Generation: Use Alt+Insert (⌘N) to generate constructors, getters/setters, overrides, etc.

  7. Use Multi-Cursor Editing: Press Alt+Shift+Click (⌥⇧Click) to add multiple cursors for simultaneous editing.

  8. Pair Shortcuts with Code Templates: Combine custom file templates with navigation shortcuts for rapid development.

  9. Use the Quick Documentation Feature: Ctrl+Q (F1) to see documentation without leaving your code.

  10. Learn to Navigate by Structure: Use Ctrl+F12 (⌘F12) to quickly jump to different methods in a file.

Resources for Further Learning

By incorporating these shortcuts into your daily workflow, you’ll significantly boost your development speed and efficiency with Android Studio. Remember that mastering shortcuts is a gradual process—start with the ones that align with your most frequent tasks and gradually expand your repertoire.

Scroll to Top