This warning often appears after opening an old Android project that looked healthy on its original developer’s machine. Your own dependency declarations may even look consistent. The mismatch is usually hiding one level deeper, inside a library that pulls an older Support Library artifact transitively.
What the message is really reporting
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes).
Found versions 28.0.0, 26.1.0. Examples include
com.android.support:animated-vector-drawable:28.0.0 and
com.android.support:mediarouter-v7:26.1.0A typical historical GradleCompatible diagnostic.
How to read those four lines
com.android.supportidentifies the retired Support Library family, not current AndroidX.28.0.0and26.1.0are both present in the resolved dependency graph, even if only one appears directly in your module file.The named artifacts are examples that prove the mismatch; another dependency may be the component that requested the older version.
Deleting build outputs cannot repair a dependency graph that still requests incompatible versions.
Find who requested the older artifact
Before editing versions, ask Gradle for evidence. Use the build variant that fails; debugRuntimeClasspath below can be replaced with releaseRuntimeClasspath or another variant-specific configuration.
./gradlew :app:dependencies --configuration debugRuntimeClasspath
./gradlew :app:dependencyInsight \
--configuration debugRuntimeClasspath \
--dependency com.android.support:mediarouter-v7com.android.support:mediarouter-v7:26.1.0
--- some.legacy:library:1.2.3
--- debugRuntimeClasspathWhy these reports beat guesswork
:app:dependenciesprints the resolved dependency tree for the application module and selected configuration.dependencyInsightreverses the question: it shows which path requestedmediarouter-v7and why Gradle selected its version.The sample output is illustrative; use the actual path in your project to decide whether to upgrade, exclude, or replace the parent library.
These tasks inspect configuration and do not modify project files.
Preferred fix: complete the AndroidX migration
AndroidX replaced the Support Library and gives each Jetpack library its own semantic version. A current project should not solve this old warning by collecting more com.android.support declarations. It should remove the old namespace from the dependency graph.
Create a focused migration branch and make sure the existing project builds before changing dependencies.
Update or replace third-party libraries that still publish
com.android.supportdependencies.Use Android Studio’s Refactor → Migrate to AndroidX when the project still contains old imports and artifacts.
Review the generated changes against the official artifact and class mappings.
Build every important variant and run instrumentation, UI, and release smoke tests.
android.useAndroidX=true
# Enable only while an unavoidable third-party binary still needs rewriting.
android.enableJetifier=trueAndroidX settings for projects on older Android Gradle Plugin versions.
Do not leave Jetifier on by habit
android.useAndroidX=trueselects AndroidX behavior; Android Gradle Plugin 9.0 and later enables it by default.android.enableJetifier=truerewrites old third-party binaries, which can slow builds and should be used only when necessary.Current Android guidance says Jetifier is normally unnecessary because most library publishers have migrated.
AGP 10 plans to remove the ability to disable AndroidX, so preserving Support Library builds is a short-term compatibility tactic.
dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.androidx.mediarouter)
implementation(libs.androidx.vectordrawable)
implementation(libs.material)
}An AndroidX dependency set; choose versions from the current Jetpack release pages or your approved version catalog.
What changed beyond the group name
A version catalog centralizes approved coordinates instead of scattering literal versions across modules.
com.android.support:mediarouter-v7maps toandroidx.mediarouter:mediarouter.com.android.support:support-vector-drawablemaps toandroidx.vectordrawable:vectordrawable.com.android.support:designmaps tocom.google.android.material:material, not anandroidx.*artifact.AndroidX libraries version independently, so they are not supposed to share one universal version number.
Historical fallback: align on Support Library 28.0.0
Sometimes the assignment is to reproduce an old APK, not modernize it. Support Library 28.0.0 was the final release and is the only sensible alignment target for that temporary branch. Keep this path isolated and document why migration is deferred.
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
}A legacy-only alignment example for a project that has not adopted AndroidX.
Limits of this compatibility repair
Directly declaring
mediarouter-v7:28.0.0can align the historical graph shown in the original error.It does not modernize source imports, provide future fixes, or make Support Library compatible with new Jetpack artifacts.
Every Support Library artifact in the resolved graph must use
28.0.0; fixing only the two examples may reveal another mismatch.Prefer upgrading or replacing the dependency that requests
26.1.0over forcing versions globally without compatibility testing.
Verify the graph, not just the editor
./gradlew :app:dependencies --configuration debugRuntimeClasspath
./gradlew :app:lintDebug
./gradlew :app:assembleDebugBUILD SUCCESSFULWhat a successful verification proves
The dependency report lets you search for remaining
com.android.supportcoordinates or unexpected selections.lintDebugreruns Android lint against the resolved debug variant.assembleDebugproves compilation and packaging, but it does not replace runtime tests on supported Android versions.Repeat the checks for release and product-flavor variants because their dependency graphs can differ.
Mistakes that keep the error alive
Only running `clean`: stale outputs disappear, but the same coordinates resolve again.
Adding a random direct dependency: it can mask one path while introducing APIs incompatible with the parent library.
Using dynamic versions such as `28.+`: builds stop being reproducible and may resolve differently later.
Forcing every version globally: resolution succeeds without proving binary or behavioral compatibility.
Mixing AndroidX and Support Library: namespaces and artifacts must be migrated as one coherent change.
Ignoring build variants: a debug graph can pass while release-only dependencies still contain the mismatch.
References and migration maps
AndroidX migration guidance explains the supported migration path and Jetifier caveats.
Official artifact mappings map old Support Library coordinates to AndroidX.
Android dependency resolution demonstrates dependency reports and conflict analysis.
Comments and corrections