android performance_error ai_generated true

ANR: Application Not Responding on main thread

ID: android/anr-main-thread

Also available as: JSON · Markdown
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
14 active

Root Cause

Long operation blocking UI thread causes ANR.

generic

Workarounds

  1. 92% success Move long operations to background: Coroutines or WorkManager
  2. 88% success Use StrictMode in debug to detect main thread violations

Dead Ends

Common approaches that don't work:

  1. Increase ANR timeout 92% fail

    Not configurable by app

  2. Use StrictMode.permitAll() 78% fail

    Hides real threading issues