简体   繁体   English

Kotlin 多平台移动 targetSdk 已弃用

[英]Kotlin Multiplatform Mobile targetSdk deprecated

I set up my build.gradle.kts file in the shared module of my KMM project like the following snippets shows:我在我的 KMM 项目的shared模块中设置了我的build.gradle.kts文件,如以下片段所示:

android {
    namespace = "com.my.project"
    compileSdk = 33

    sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
    defaultConfig {
        minSdk = 24
        targetSdk = 33
    }
}

For the targetSDK I get the following warning:对于targetSDK ,我收到以下警告:

targetSdk: Int?' is deprecated. Will be removed from library DSL in v9.0

How can I migrate this part and set the targetSdk version appropriately in my KMM project for the Android project?如何迁移这部分并在我的 KMM 项目中为 Android 项目适当设置targetSdk版本?

It is only advisory property, you could safely delete it.它只是建议属性,您可以安全地删除它。 minSdk is enough. minSdk就足够了。 See LibraryBaseFlavor reference deprecation message.请参阅LibraryBaseFlavor 参考弃用消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于 Kotlin 多平台移动设备的 Skia - Skia for Kotlin multiplatform mobile Kotlin 多平台用于开发移动 SDK? - Kotlin multiplatform for developing Mobile SDK? 使用 Kotlin Multiplatform Mobile (KMM) 的多平台应用程序中的数据绑定错误 - DataBinding error in multiplatform app using Kotlin Multiplatform Mobile (KMM) minSdk,targetSDK,已弃用 - Android - minSdk, targetSDK, Deprecated - Android Kotlin Multiplatform Mobile 可以与 Jetpack Compose 一起使用吗? - Could Kotlin Multiplatform Mobile work with Jetpack Compose? 项目完成后如何将 Kotlin 项目转换为 Kotlin Multiplatform Mobile? - How to convert Kotlin project to Kotlin Multiplatform Mobile after the project completion? 用于新项目的 Kotlin Multiplatform Mobile 插件向导:下一步按钮已禁用 - Wizard of Kotlin Multiplatform Mobile plugin for a new project: Next button is disabled KMM Kotlin 多平台移动错误:无法检测已安装 Xcode 的版本 - KMM Kotlin Multiplatform Mobile Error: Could not detect version of installed Xcode 无法在 MacBook M1 芯片上构建 Kotlin 多平台移动项目 - Unable to build Kotlin Multiplatform mobile project on MacBook M1 chip 如何为 Kotlin Multiplatform 移动项目有效地保持 RAM 中的连续内存 - How to keep efficiently continuous memory in RAM for Kotlin Multiplatform mobile project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM