Capture the complete reference chain
Keep the missing type, the referring class and the affected variant. Read the first meaningful optimizer diagnostic rather than only the final failed-task line.
The Android dependency guide and R8 rules reference are the starting points for deciding whether the problem is resolution, optional code or retention.
Classify the missing dependency
| Situation | Likely action |
|---|---|
| Required library omitted | Add the correct dependency and scope |
| Dependency version changed its API | Align compatible versions |
| Compile-only type used at runtime | Correct the runtime dependency model |
| Optional integration never used | Confirm the library's documented suppression |
| Typo or obsolete class reference | Fix the source or generated code |
A keep rule cannot retain a definition that never entered the build.
Inspect the exact configuration
Use the module and variant that failed:
./gradlew :app:dependencies --configuration releaseRuntimeClasspath
Flavor names change configuration names. Compare compile and runtime graphs when a class compiles successfully but is absent from the packaged dependency set.
Treat generated suggestions as evidence
R8 may produce suggested rules or diagnostics. Read them before applying them. A suppression can be correct for a documented optional platform integration, but a blanket -dontwarn ** masks unrelated future defects.
Avoid downloading arbitrary JARs from untrusted mirrors to satisfy a class name. Verify the artifact publisher and supported version.
Reproduce after the fix
Rebuild the same optimized variant and exercise the code path that references the class. Then check the output dependency inventory. APKLint's Build Analyzer or Gradle Dependency Checker can support configuration review, but neither can resolve a private repository or prove that a missing class is truly optional.
Sources and further reading
Reference review: 22 September 2026. Examples illustrate the workflow; check your installed versions, release artifact and account-specific Console requirements before applying them. This guide is not a claim that APKLint executed your project or verified your private account.



