Skip to content

Performance and Optimization

Deploy Wiki[bot] edited this page Mar 28, 2025 · 3 revisions

What is an ANR?

An ANR (Application Not Responding) in Android occurs when an app stops responding for more than 5 seconds. When this happens, the system shows a dialog box asking the user whether to close the app or wait.

How to avoid ANRs? How to keep the app responsive?

Avoid blocking the main thread with heavy operations like network calls, disk I/O, or complex computations, and use background threads for long-running tasks.

What is a Crash?

A crash in Android occurs when an app stops unexpectedly. This can happen for various reasons, such as trying to access unavailable resources, logic errors, unhandled exceptions, or memory issues. When it happens, the system shows an error message and closes the app.