# Failed to transform artifact 'support-v4.aar' using Jetifier. Reason: Cannot find a mapping for support class 'android/support/v4/app/FragmentActivity'

- **ID:** `android/gradle-transform-error-jetifier-missing-mapping`
- **Domain:** android
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Jetifier cannot map an old support library class to AndroidX because the mapping file is incomplete or the library version is too old.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Android Gradle Plugin 7.4.0 | active | — | — |
| Android Gradle Plugin 8.0.0 | active | — | — |
| Android Gradle Plugin 8.1.0 | active | — | — |

## Workarounds

1. **Exclude the problematic library from Jetifier: in build.gradle, add `android.jetifier.blacklist = ["support-v4.aar"]` and manually migrate its usage to AndroidX equivalents like `androidx.legacy:legacy-support-v4:1.0.0`.** (90% success)
   ```
   Exclude the problematic library from Jetifier: in build.gradle, add `android.jetifier.blacklist = ["support-v4.aar"]` and manually migrate its usage to AndroidX equivalents like `androidx.legacy:legacy-support-v4:1.0.0`.
   ```
2. **Update the library to an AndroidX version: replace `com.android.support:support-v4:28.0.0` with `androidx.legacy:legacy-support-v4:1.0.0` in dependencies.** (92% success)
   ```
   Update the library to an AndroidX version: replace `com.android.support:support-v4:28.0.0` with `androidx.legacy:legacy-support-v4:1.0.0` in dependencies.
   ```
3. **Add a custom Jetifier mapping: create a file `jetifier-mappings.txt` with `android/support/v4/app/FragmentActivity -> androidx/fragment/app/FragmentActivity` and reference it via `android.jetifier.mappingsFile`.** (85% success)
   ```
   Add a custom Jetifier mapping: create a file `jetifier-mappings.txt` with `android/support/v4/app/FragmentActivity -> androidx/fragment/app/FragmentActivity` and reference it via `android.jetifier.mappingsFile`.
   ```

## Dead Ends

- **Delete .gradle cache and rebuild** — Cache is not the issue; the mapping file is missing or library is incompatible. (95% fail)
- **Add Jetifier mapping manually in gradle.properties: `android.jetifier.blacklist=.*`** — Blacklisting doesn't solve missing mapping; it just skips the library, potentially causing runtime errors. (80% fail)
- **Update all dependencies to latest versions** — The specific library 'support-v4.aar' may not have an AndroidX equivalent; updating other deps doesn't help. (70% fail)
