# Android Gradle: Execution failed for task ':app:checkDebugAarMetadata'. Dependency requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs

**Code:** `Dependency requires compileSdk 34 or later` · **Category:** Flutter / Dart · **Seen on:** Flutter, Android

A dependency was built against a newer Android API than your project's `compileSdk`.

## Meaning

Set `compileSdk` (and usually `targetSdk`) to the required version in `android/app/build.gradle` or use `flutter.compileSdkVersion` after upgrading Flutter. Install that SDK platform in the SDK Manager.

## Common causes

- compileSdk lower than the plugin's requirement
- Hard-coded compileSdkVersion in build.gradle
- SDK platform not installed
- Plugin upgrade bumped its API level
- Flutter not upgraded

## Quick fix

1. Set `compileSdk 34` (or required) in `android/app/build.gradle`
2. Install the matching Android SDK Platform
3. Upgrade Flutter so `flutter.compileSdkVersion` is current

## Detailed fix by platform

### Android

1. In `android {}`: `compileSdk = 34` (Kotlin DSL) or `compileSdkVersion 34` (Groovy)

## How to diagnose

1. **Required** — API in the message?
2. **Installed** — SDK platform present?
3. **File** — build.gradle updated?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/flutter/checkaarmetadata-compile-sdk)
