After the Android Studio plugin is upgraded, the kotlin jdk version conflicts
When I created a new kotlin project today, the plug-in version was saved. I found that the new version of the plug-in needs to improve the sdk version supported. I hope it can help students who report the same error.
report error
8 issues were found when checking AAR metadata:
-
Dependency ‘androidx.navigation:navigation-common:2.7.0’ 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.navigation:navigation-common-ktx:2.7.0’ 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.navigation:navigation-runtime:2.7.0’ 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.navigation:navigation-ui:2.7.0’ 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.navigation:navigation-runtime-ktx:2.7.0’ 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.navigation:navigation-ui-ktx:2.7.0’ 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 'a
plan
Modify the kotlin-stdlib-jdk loading method in the build.gradle file
Just change the version that supports the highest sdk to 34, because the sdk version of 34 is relatively high, so you may need a relatively high version of the Android Gradle plugin, I use version 8.0.2, you can change it here