# DexGuard: Mapping file not found: /path/to/mapping.txt. Obfuscation may fail.

- **ID:** `android/dexguard-obfuscation-mapping-not-found`
- **Domain:** android
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

DexGuard requires a mapping file for incremental obfuscation, but the file is missing due to a clean build or misconfigured output path.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| DexGuard 9.0 | active | — | — |
| DexGuard 10.0 | active | — | — |
| Android Gradle Plugin 7.4 | active | — | — |
| Android Gradle Plugin 8.0 | active | — | — |

## Workarounds

1. **Configure DexGuard to generate a new mapping file by adding '-dontobfuscate' temporarily, then re-enable obfuscation with the correct mapping path.** (80% success)
   ```
   Configure DexGuard to generate a new mapping file by adding '-dontobfuscate' temporarily, then re-enable obfuscation with the correct mapping path.
   ```
2. **Set the mapping file output path in the DexGuard configuration: '-printmapping /path/to/mapping.txt' and ensure the directory exists.** (85% success)
   ```
   Set the mapping file output path in the DexGuard configuration: '-printmapping /path/to/mapping.txt' and ensure the directory exists.
   ```
3. **Perform a clean build (./gradlew clean) and rebuild; DexGuard will create a new mapping file if the output directory is writable.** (75% success)
   ```
   Perform a clean build (./gradlew clean) and rebuild; DexGuard will create a new mapping file if the output directory is writable.
   ```

## Dead Ends

- **** — DexGuard expects a mapping file for consistent obfuscation; without it, obfuscation may fail or produce inconsistent results. (80% fail)
- **** — This defeats the purpose of using DexGuard and may leave the app unprotected. (90% fail)
