‹ 首页

android-studio

@clawic · 收录于 昨天 · 上游提交 2 天前

Work fast in Android Studio IDE with debugging, profiling, refactoring, and productivity shortcuts.

适合你,如果你使用 Android Studio 进行安卓应用开发。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add clawic/skills/android-studio
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- clawic/skills/android-studio
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify clawic/skills/android-studio
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
14GitHub stars
~1.2K最小装载
~3.5K含声明引用
~3.5K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 f825206 · 表述以原文为准
它做什么

安装后,Claude 会帮你更高效地使用 Android Studio:提供调试、性能分析、布局检查、代码导航、重构等操作的步骤和快捷键。

什么时候触发

当你在使用 Android Studio IDE 时,Claude 会主动介入,帮你使用调试工具、性能分析器、布局检查器、代码导航、重构和键盘快捷键。

装好后可以这样说
Claude 会指导你添加条件断点。
Claude 会根据你的系统给出对应快捷键。
技能原文 SKILL.md作者撰写 · MIT · f825206
Setup

On first use, read setup.md for integration guidelines.

When to Use

User works with Android Studio IDE. Agent helps with debugging tools, profiler, layout inspector, code navigation, refactoring, and keyboard shortcuts.

Architecture

Memory at ~/Clawic/data/android-studio/. See memory-template.md for structure.

~/Clawic/data/android-studio/
├── memory.md      # Preferences and project context
└── shortcuts.md   # Custom shortcuts learned
Quick Reference

| Topic | File | |-------|------| | Setup process | setup.md | | Memory template | memory-template.md | | Shortcuts | shortcuts.md | | Debugging | debugging.md |

Core Rules
1. Check IDE Version First

Before suggesting features, confirm Android Studio version. Features vary significantly between Arctic Fox, Bumblebee, Flamingo, Hedgehog, and newer versions.

2. Platform-Aware Shortcuts

| Action | macOS | Windows/Linux | |--------|-------|---------------| | Search Everywhere | Double Shift | Double Shift | | Find Action | Cmd+Shift+A | Ctrl+Shift+A | | Recent Files | Cmd+E | Ctrl+E | | Navigate to Class | Cmd+O | Ctrl+N | | Navigate to File | Cmd+Shift+O | Ctrl+Shift+N | | Refactor This | Ctrl+T | Ctrl+Alt+Shift+T | | Run | Ctrl+R | Shift+F10 | | Debug | Ctrl+D | Shift+F9 |

3. Use IDE Tools Over Manual Inspection
  • Layout Inspector over print debugging for UI issues
  • Profiler over manual timing for performance
  • Database Inspector over manual queries
  • Network Inspector over logging requests
4. Leverage Code Generation
  • Live Templates for boilerplate (type abbreviation + Tab)
  • File Templates for new components
  • Generate menu (Cmd/Alt+N) for constructors, getters, overrides
5. Debugging Strategy
  1. Breakpoints with conditions for targeted debugging
  2. Evaluate Expression (Alt+F8) for runtime inspection
  3. Watches for tracking variables across frames
  4. Frame inspection to navigate call stack
Debugging Traps
  • Setting breakpoints in hot loops → freezes IDE. Use conditional breakpoints.
  • Debugging release builds → missing symbols. Debug with debug variant.
  • Ignoring Logcat filters → drowning in logs. Filter by app package or tag.
  • Not using "Attach Debugger" → missing app startup. Attach to running process.
Profiling Traps
  • Profiling debug builds → misleading performance. Profile release builds.
  • CPU Profiler without filtering → overwhelming data. Focus on specific methods.
  • Memory Profiler heap dumps during GC → skewed results. Trigger GC first.
  • Ignoring Network Profiler → missing slow API calls. Always check network timing.
Essential IDE Features
Layout Inspector
  • Inspect live view hierarchy in running app
  • 3D mode for seeing layer depth
  • Attribute inspection for debugging constraints
  • Works with Compose and View system
Database Inspector
  • Query Room databases in real-time
  • Edit values directly for testing
  • Export data for analysis
  • Requires API 26+ on device
Network Inspector
  • Inspect OkHttp/Retrofit requests without code changes
  • View request/response bodies
  • Timeline for identifying slow calls
  • Requires enabling in manifest for release
App Inspection
  • Combined view of Database, Network, Background Tasks
  • WorkManager task monitoring
  • Background task scheduling inspection
Profiler Tools

| Tool | Use Case | |------|----------| | CPU Profiler | Method timing, thread analysis | | Memory Profiler | Leaks, allocation tracking | | Energy Profiler | Battery usage patterns | | Network Profiler | Request timing, payload size |

Refactoring Shortcuts

| Refactoring | macOS | Windows/Linux | |-------------|-------|---------------| | Rename | Shift+F6 | Shift+F6 | | Extract Method | Cmd+Alt+M | Ctrl+Alt+M | | Extract Variable | Cmd+Alt+V | Ctrl+Alt+V | | Extract Constant | Cmd+Alt+C | Ctrl+Alt+C | | Inline | Cmd+Alt+N | Ctrl+Alt+N | | Move | F6 | F6 | | Change Signature | Cmd+F6 | Ctrl+F6 |

Build Configuration
Gradle Sync Issues
  • File → Invalidate Caches / Restart for persistent issues
  • Delete .gradle and .idea folders as last resort
  • Check Gradle JDK in Preferences → Build → Gradle
Build Variants
  • Select variant in Build Variants panel
  • Debug vs Release affects debugging capabilities
  • Product flavors for different app configurations
SDK Manager
  • Tools → SDK Manager for Android SDK updates
  • Install platform tools matching target devices
  • Keep build tools updated for latest features
Emulator Tips
  • Cold Boot vs Quick Boot: use Quick Boot for speed
  • Extended Controls (three dots) for sensors, location, battery
  • Snapshots for saving specific device states
  • Device mirroring for physical device control
Plugin Recommendations

| Plugin | Purpose | |--------|---------| | Key Promoter X | Learn shortcuts | | Rainbow Brackets | Bracket matching | | ADB Idea | Quick ADB commands | | JSON To Kotlin Class | Data class generation | | Compose Color Preview | Color visualization |

Related Skills

More Clawic skills, get them at https://clawic.com/skills/<slug> (install if the user confirms):

  • android — Android development patterns
  • kotlin — Kotlin language features
  • java — Java language patterns
Feedback
  • If useful, star it: https://clawic.com/skills/android-studio
  • Latest version: https://clawic.com/skills/android-studio
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。