Manifest merger failed uses-sdkminSdkVersion 14
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
The Android error about manifest merger and uses-sdk:minSdkVersion usually appears when one library requires a higher API level than your app declares. This is a build-time compatibility check, not a random Gradle glitch. The right fix is to align dependency requirements with your supported device strategy instead of suppressing the error.
How Manifest Merger Works
During build, Android merges manifests from:
- your app module
- build type and product flavor overlays
- all AAR dependencies and transitive libraries
If any dependency declares a minimum SDK above your app minimum, merger fails because final manifest cannot represent contradictory requirements.
You can inspect exact conflict origin in Android Studio through the Merged Manifest view, which shows where each attribute was contributed.
Typical Conflict Scenario
App declares minSdk 14, but imported library supports only API 21 and above.
If the dependency requires API 21, build fails with min SDK mismatch message.
Preferred Resolution Paths
The correct approach depends on product requirements.
Raise app minimum SDK
If business no longer supports old devices, raising app minSdk is cleanest.
Downgrade or replace dependency
If supporting API 14 is still mandatory, choose dependency versions that explicitly support it, or use alternative libraries.
Feature partitioning
Sometimes only one feature needs newer API support. Move that feature into a separate module or guarded flow and keep core app compatible.
Avoid Blind tools:overrideLibrary
tools:overrideLibrary can bypass merger checks, but it can also ship app builds that crash at runtime on old devices.
Only use this when you audited library behavior and proved with device testing that unsupported APIs are never executed on lower versions.
Debugging Workflow That Saves Time
A repeatable triage flow prevents guesswork:
- Read the full Gradle output and identify conflicting library package name.
- Open Merged Manifest and inspect
uses-sdkcontributors. - Run dependency tree to find transitive source.
- Decide whether to raise min SDK or swap dependency.
- Rebuild and test on lowest supported emulator.
Dependency insight command:
This helps confirm whether conflict came from direct or nested dependency.
Flavor Specific Strategies
If your app has flavors with different device targets, set minSdk per flavor instead of one global value.
This approach can keep broader compatibility for one distribution while allowing modern APIs in another.
Runtime Guarding for Optional APIs
Even with compatible dependencies, your own code must guard newer APIs.
Manifest and runtime checks work together. Passing merge does not guarantee runtime safety.
CI and Release Discipline
Add one CI build variant that uses your lowest supported SDK emulator or instrumentation environment. Many teams catch min SDK regressions too late because CI builds only on modern API levels.
For dependency updates, include an automated report in pull requests showing changed minSdk expectations where possible.
Common Pitfalls
- Using
tools:overrideLibraryfor quick build success without validating runtime API safety. - Inspecting only direct dependencies while transitive dependencies cause the real min SDK conflict.
- Forgetting flavor-specific
minSdkdeclarations and misreading which variant is failing. - Updating libraries without testing on the lowest supported API level in CI.
- Ignoring stale Gradle caches after dependency changes and debugging outdated artifacts.
Summary
- This merger error signals a real API compatibility mismatch.
- Use merged manifest and dependency tree output to find the exact source.
- Prefer raising
minSdkor choosing compatible libraries over bypass directives. - Use flavor-specific SDK targets when product strategy requires multiple device tiers.
- Validate on lowest supported runtime to prevent build-success and runtime-failure gaps.

