# android.content.res.Resources$NotFoundException: Resource ID #0x7f...

**Code:** `Resources$NotFoundException` · **Category:** Android · **Seen on:** Android

Code asked for a resource ID that doesn’t exist for the current configuration — often passing an int to setText(), or a resource only in a qualified folder.

## Meaning

textView.setText(count) treats the int as a string resource ID. Drawables only in drawable-v24/-night, or resources stripped by shrinking (shrinkResources), also cause it.

## Common causes

- Passing an Int to setText() instead of a String
- Resource only in a qualified folder (v24, night, sw600dp)
- Resource removed by resource shrinking
- Dynamic getIdentifier lookups

## Quick fix

1. Use setText(count.toString())
2. Provide a default resource in the unqualified folder
3. Keep dynamically referenced resources (tools:keep)

## Detailed fix by platform

### Kotlin

1. `binding.counter.text = count.toString()   // not setText(count)`

## How to diagnose

1. **ID** — Which resource (aapt dump)?
2. **Call** — setText(Int)?
3. **Configuration** — Qualifiers

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/android/resources-notfoundexception)
