Debug your Android app based on ANR tags in the Crashlytics dashboard Stay organized with collections Save and categorize content based on your preferences.
Application Not Responding (ANR) errors are triggered when the UI thread of theapplication is not responding for more than
Additionally, Crashlytics can help pinpoint specific problematic threads. Weanalyze ANRs, and then, in theCrashlytics dashboard, wetag applicable threads to provide hints on how to debug the ANR.
The following sections on this page explain what each ANR tag means, shows anexample ANR with that tag, and provides a recommended solution to debug the ANR.
Triggered ANR
A thread which was blocked for too long and triggered the ANR is annotated withthisTriggered ANR
The problematic thread can be the main thread for the app, or any thread foundto be unresponsive. However, the thread tagged asTriggered ANR
Deadlocked
Any threads which are found to be involved in a deadlock that led to the ANR areannotated with thisDeadlocked
A deadlock occurs when a thread enters a waiting state because a requiredresource is held by another thread, which is also waiting for a resource held bythe first thread. If the app's main thread is in this situation, ANRs are likelyto happen.
View example
Here are two threads involved in a deadlock:
main (unknown): tid=1 systid=1568 com.android.server.pm.PackageManagerService$PackageManagerInternalImpl.getPackage(PackageManagerService.java:22701) com.android.server.pm.PackageManagerService$PackageManagerInternalImpl.filterOnlySystemPackages(PackageManagerService.java:22787) ... com.android.server.SystemServer.main(SystemServer.java:368) java.lang.reflect.Method.invoke(Native method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:517) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)ActivityManager (unknown): tid=21 systid=1902 com.android.server.pm.PackageManagerService.getPackageSetting(PackageManagerService.java:23618) com.android.server.pm.PackageManagerService.getPackageUid(PackageManagerService.java:4542) ... android.os.Handler.handleCallback(Handler.java:907) android.os.Handler.dispatchMessage(Handler.java:99) android.os.Looper.loop(Looper.java:216) android.os.HandlerThread.run(HandlerThread.java:67) com.android.server.ServiceThread.run(ServiceThread.java:44)
Recommendation
Look at threads involved in the deadlock and check the resources/locks acquiredby those threads. Refer toDeadlock andDeadlock prevention algorithms for possible solutions.
IO Root blocking
Any thread that was executing slow I/O operations and blocked theTriggered ANRIO Root blockingTriggered ANRIO Root blockingRoot blocking
View examples
Thread main(THREAD_STATE_TIMED_WAITING) sun.misc.Unsafe.park( Unsafe.java:0 ) java.util.concurrent.locks.LockSupport.parkNanos( LockSupport.java:230 ) android.database.sqlite.SQLiteConnectionPool.waitForConnection( SQLiteConnectionPool.java:756 ) ... android.app.ActivityThread.main( ActivityThread.java:8192 )
Thread main(THREAD_STATE_NATIVE_WAITING) Syscall art::ConditionVariable::WaitHoldingLocks(art::Thread*) art::GoToRunnable(art::Thread*) art::JniMethodEnd(unsigned int, art::Thread*) libcore.io.Linux.fdatasync( Linux.java:0 ) libcore.io.ForwardingOs.fdatasync( ForwardingOs.java:105 )... java.io.RandomAccessFile.write( RandomAccessFile.java:559 )... android.app.ActivityThread.main( ActivityThread.java:8192 )
Recommendation
In general, your app shouldn't execute expensive I/O operations on the mainthread. In the case of the main thread beingIO Root blocking
Root blocking
Any thread that blocked the thread tagged asTriggered ANRRoot blockingRoot blockingTriggered ANR
If anyTriggered ANRRoot blocking
View examples
Here are a few examples based on thread state:
Thread main(THREAD_STATE_RUNNABLE) android.os.Parcel.createTypedArray( Parcel.java:3086 ) android.content.pm.PackageInfo.<init>( PackageInfo.java:546 )... android.app.ActivityThread$H.handleMessage( ActivityThread.java:2166 ) android.os.Handler.dispatchMessage( Handler.java:106 ) android.os.Looper.loop( Looper.java:246 ) android.app.ActivityThread.main( ActivityThread.java:8633 )
Thread main(THREAD_STATE_BLOCKED) DBHelper.runOnDB( DBHelper.java:97 ) DBHelper.runDb( DBHelper.java:125 )... java.lang.reflect.Method.invoke( Method.java:0 ) EventBus.invokeSubscriber( EventBus.java:510 ) postToSubscription( EventBus.java:437 )... android.os.Handler.handleCallback( Handler.java:938 ) android.os.Handler.dispatchMessage( Handler.java:99 ) android.os.Looper.loop( Looper.java:268 ) android.app.ActivityThread.main( ActivityThread.java:7904 )
Recommendation
Minimize CPU intensive work in the main thread. Use worker or background threadsfor performing CPU intensive tasks.
Minimize I/O intensive work, like loading from a database, on the main thread.
Unknown root cause
A thread is tagged with theUnknown root cause
View example
Thread main(THREAD_STATE_NATIVE_WAITING) __epoll_pwait android::Looper::pollInner(int) android::Looper::pollOnce(int, int*, int*, void**) android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int) android.os.MessageQueue.nativePollOnce( MessageQueue.java:0 ) android.os.MessageQueue.next( MessageQueue.java:335 ) android.os.Looper.loop( Looper.java:193 ) android.app.ActivityThread.main( ActivityThread.java:8019 )
Recommendation
Follow the general advice on how to prevent ANRs. For example, identify theplaces in your code where the app’s main thread can be busy for more than
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.