ANR: Application Not Responding (Input dispatching timed out)

The main thread was blocked for about 5 seconds (input) or a broadcast/service took too long, so Android showed “App isn’t responding”.

Seen on: Android

Meaning

Disk/network/database work on the main thread, lock contention, heavy layout or deadlocks cause ANRs. Play Console’s Android vitals and traces.txt show the main-thread stack.

Common causes

  • I/O, database or network on the main thread
  • Long computations/JSON parsing on main
  • Deadlock or waiting on a lock
  • BroadcastReceiver onReceive doing heavy work

⚡ Quick fix

  1. Move work to background (coroutines, WorkManager)
  2. Enable StrictMode in debug to catch disk/network on main
  3. Read the ANR trace to find the blocking call

Detailed fix by platform

Kotlin

  1. if (BuildConfig.DEBUG) StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build())

ADB

  1. adb bugreport ./anr-report.zip # contains /data/anr traces

How to diagnose

  1. Trace — Main thread stack in the ANR report
  2. Vitals — Play Console ANR clusters

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.