Dependency 'androidx.x:1.y' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs
A library needs a higher compileSdk than your module uses (checkAarMetadata task).
Seen on:
Android
Meaning
New AndroidX/Material versions require recent compileSdk. compileSdk only affects compilation (not minSdk), so raising it is usually safe; AGP may also need upgrading for very new compileSdk values.
Common causes
- compileSdk lower than a dependency requires
- Library upgraded via BOM/transitive dependency
- AGP too old for the needed compileSdk
⚡ Quick fix
- Raise compileSdk to the required level
- Upgrade AGP if it warns about the compileSdk
- Or pin the dependency to an older version
Detailed fix by platform
Gradle
- kotlin
android { compileSdk = 35 }
How to diagnose
- Task — checkDebugAarMetadata output
- Dependency — Which library forces it?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Android
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026