android-crash-analyzer

Diagnose Android crash logs, identify root causes, and propose safe fixes with verification steps.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-crash-analyzer-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-crash-analyzer
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/ai-coding/skills/android-crash-analyzer
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill android-crash-analyzer-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Investigating Android crashes from raw logcat output is slow and error-prone: stack traces mix framework noise with app frames, and symptoms often hide the real root cause. This Skill structures crash analysis so you find the actual defect instead of patching symptoms. ## Core Features & Use Cases - Crash Classification: Categorizes exceptions like NullPointerException, IllegalStateException, and fragment transaction crashes into root-cause buckets such as lifecycle state, threading, or stale references. - Suspect Code Location: Walks the stack trace to the first meaningful app frame and inspects callers, lifecycle owners, coroutines, and adapters, optionally grounded by CodeGraph exploration. - Safe Fix Recommendations: Proposes minimal fixes (null handling, lifecycle-aware collection, guarded fragment transactions) with explicit validation steps and regression tests, while flagging anti-patterns like broad try/catch and force unwraps. - Use Case: Given a production NullPointerException logcat trace from a Fragment, the Skill identifies the destroyed view access after onDestroyView, recommends viewLifecycleOwner.lifecycleScope, and lists regression tests to add. ## Quick Start Analyze this Android crash logcat output and tell me the likely root cause, the suspect files, and the safest fix with verification steps.

Frequently Asked Questions about android-crash-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of an Android crash from a stack trace?

Walk the stack trace top to bottom to find the first frame owned by your app, then classify the exception into a bucket like nullability, lifecycle state, or threading. Form a hypothesis about what state was invalid and why before proposing any fix.

How to debug NullPointerException in Android Kotlin code?

Identify why the value can be null at runtime despite assumptions, checking restored state, intent extras, async callbacks, and lifecycle timing. Prefer proper null handling and state validation over force unwraps with the !! operator.

Why does my Fragment crash with IllegalStateException?

IllegalStateException in Fragments usually comes from lifecycle ordering issues or duplicate transactions. Check transaction timing, isAdded and isStateSaved flags, view lifecycle boundaries, and whether navigation calls are duplicated.

Can CodeGraph help analyze Android crashes?

CodeGraph can explore callers and callees of the crashing method to reveal null argument sources and async boundaries. It does not index XML layouts or Gradle files, so fall back to rg or grep for resource and manifest-related crashes.

What fixes should I avoid when patching an Android crash?

Avoid broad try/catch blocks that hide the bug, force unwraps, arbitrary delays to mask race conditions, and retry loops without state correction. These anti-patterns conceal the root cause and let the crash resurface elsewhere.