Here’s a cheat sheet for some commonly used commands and shortcuts in Android Studio:
General Shortcuts
- Build and Run:
- Build:
Ctrl + F9
(Windows/Linux) orCmd + F9
(Mac) - Run:
Shift + F10
- Build:
- Debugger:
- Toggle Breakpoint:
Ctrl + F8
(Windows/Linux) orCmd + F8
(Mac) - Step Over:
F8
- Step Into:
F7
- Resume:
F9
- Toggle Breakpoint:
- Code Navigation:
- Go to Class:
Ctrl + N
(Windows/Linux) orCmd + O
(Mac) - Go to File:
Ctrl + Shift + N
(Windows/Linux) orCmd + Shift + O
(Mac) - Go to Symbol:
Ctrl + Alt + Shift + N
(Windows/Linux) orCmd + Opt + O
(Mac)
- Go to Class:
Editing Shortcuts
- Code Completion:
- Basic Completion:
Ctrl + Space
- Smart Completion:
Ctrl + Shift + Space
- Basic Completion:
- Refactoring:
- Rename:
Shift + F6
- Extract Method:
Ctrl + Alt + M
(Windows/Linux) orCmd + Alt + M
(Mac) - Extract Variable:
Ctrl + Alt + V
(Windows/Linux) orCmd + Alt + V
(Mac)
- Rename:
- Commenting:
- Comment/Uncomment:
Ctrl + /
(Windows/Linux) orCmd + /
(Mac) - Block Comment:
Ctrl + Shift + /
(Windows/Linux) orCmd + Shift + /
(Mac)
- Comment/Uncomment:
Navigation
- File Navigation:
- Toggle Project View:
Alt + 1
- Navigate Between Tabs:
Ctrl + Tab
(Windows/Linux) orCmd +
(Mac)
- Toggle Project View:
- Code Navigation:
- Go to Declaration:
Ctrl + B
(Windows/Linux) orCmd + B
(Mac) - Find Usages:
Alt + F7
(Windows/Linux) orCmd + F7
(Mac)
- Go to Declaration:
- Usage Search:
- Find Usages:
Alt + F7
(Windows/Linux) orCmd + F7
(Mac) - Show Usages:
Ctrl + Alt + F7
(Windows/Linux) orCmd + Opt + F7
(Mac)
- Find Usages:
Productivity Shortcuts
- Live Templates:
- Surround with:
Ctrl + Alt + T
(Windows/Linux) orCmd + Alt + T
(Mac) - Expand Live Template:
Tab
- Surround with:
- Run Configurations:
- Edit Configurations:
Shift + Alt + F10
(Windows/Linux) orCtrl + Option + R
(Mac) - Select Configuration:
Shift + Alt + F10
(Windows/Linux) orCtrl + Option + R
(Mac)
- Edit Configurations:
- Database Tools:
- Open Database Tool:
Alt + 9
- Execute Query:
Ctrl + Enter
(Windows/Linux) orCmd + Enter
(Mac)
- Open Database Tool:
Version Control
- Git:
- Commit Changes:
Ctrl + K
(Windows/Linux) orCmd + K
(Mac) - Update Project:
Ctrl + T
(Windows/Linux) orCmd + T
(Mac)
- Commit Changes:
- GitHub Integration:
- Push Commits:
Ctrl + Shift + K
(Windows/Linux) orCmd + Shift + K
(Mac) - Pull Commits:
Ctrl + T
(Windows/Linux) orCmd + T
(Mac)
- Push Commits:
Feel free to explore more shortcuts based on your specific needs. You can find the full list of shortcuts in Android Studio by navigating to Help -> Keymap Reference
.