2 issues were found when checking AAR metadata:
-
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). -
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
You have multiple options for resole this issue.
You needed update:
android {
compileSdkVersion 34
…
defaultConfig {
applicationId "xxxxx"
targetSdkVersion 34 //flutter.targetSdkVersion
….
}
}
well pass issus hope help you.
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.
I had same problem in react native. I have fixed it with using latest stable version.
I added this in app build.gradle