skip to Main Content

2 issues were found when checking AAR metadata:

  1. Dependency ‘androidx.core:core:1.12.0-alpha05’ requires libraries and applications that
    depend on it to compile against version 34 or later of the
    Android APIs.

    :app is currently compiled against android-33.

    Also, the maximum recommended compile SDK version for Android Gradle
    plugin 8.0.2 is 33.

    Recommended action: Update this project’s version of the Android Gradle
    plugin to one that supports 34, then update this project to use
    compileSdk of at least 34.

    Note that updating a library or application’s compileSdk (which
    allows newer APIs to be used) can be done separately from updating
    targetSdk (which opts the app in to new runtime behavior) and
    minSdk (which determines which devices the app can be installed
    on).

  2. Dependency ‘androidx.core:core-ktx:1.12.0-alpha05’ requires libraries and applications that
    depend on it to compile against version 34 or later of the
    Android APIs.

    :app is currently compiled against android-33.

    Also, the maximum recommended compile SDK version for Android Gradle
    plugin 8.0.2 is 33.

    Recommended action: Update this project’s version of the Android Gradle
    plugin to one that supports 34, then update this project to use
    compileSdk of at least 34.

    Note that updating a library or application’s compileSdk (which
    allows newer APIs to be used) can be done separately from updating
    targetSdk (which opts the app in to new runtime behavior) and
    minSdk (which determines which devices the app can be installed
    on).

I have increased compileSdk, targetSdk values from 33 to 34 in build.gradle file (app level), but then when executing I had this error:

We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (8.0.2) was tested up to compileSdk = 33.

You are strongly encouraged to update your project to use a newer
Android Gradle plugin that has been tested with compileSdk = 34.

If you are already using the latest version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdk = 34 is available.

To suppress this warning, add/update
android.suppressUnsupportedCompileSdk=34
to this project’s gradle.properties.

4

Answers


  1. You have multiple options for resole this issue.

    1. Downgrade androidx.core:core:1.12.0-alpha05′ dependency
    2. Upgrade your compile SDK version and minSdk version to 34 also update gradle plugin version. (update java sdk 11 0r later. because latest gradle versions not support older java versions )
    Login or Signup to reply.
  2. You needed update:
    android {
    compileSdkVersion 34

    defaultConfig {
    applicationId "xxxxx"
    targetSdkVersion 34 //flutter.targetSdkVersion
    ….
    }
    }
    well pass issus hope help you.

    Login or Signup to reply.
  3. I just use ‘androidx.core:core:1.10.1’ with Android Gradle plugin 8.0.2, gradle-8.0 and compileSdk/targetSdk 33.

    I NEVER use alpha versions if I don’t have to.

    Login or Signup to reply.
  4. I had same problem in react native. I have fixed it with using latest stable version.

    I added this in app build.gradle

    configurations.all {
      resolutionStrategy {
          force "androidx.core:core-ktx:1.10.1"
       }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search