[Android studio new project plug-in version error]

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:

  1. 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).

  2. 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).

  3. 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).

  4. 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).

  5. 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).

  6. 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).

  7. Dependency 'a

insert image description here

plan

Modify the kotlin-stdlib-jdk loading method in the build.gradle file
insert image description here

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
insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/LLCCQAQ/article/details/132192929