You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android项目compileSdk 33但Play商店显示Target SDK为24问题求助

上传Google Play时Target SDK版本显示为24的问题解决

你的defaultConfig配置里没有显式声明targetSdkVersion,Android Gradle插件会默认把它设置成和minSdkVersion一样的值(也就是你设置的24),这就是Google Play显示Target SDK为24的原因。

解决方法很简单:

  • 在defaultConfig代码块中添加targetSdkVersion配置,建议设置为和compileSdk一致的版本(这里是33),或者符合Google Play当前要求的更高版本。修改后的完整配置如下:
defaultConfig {
        applicationId "com.portlmedia.streets"
        minSdkVersion 24
        compileSdk 33
        targetSdkVersion 33 // 新增这一行
        versionCode 4
        versionName "1.0.2"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        buildConfigField "String", "WEBVIEW_URL", "\"https://streets.portlmedia.com\""
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
        }
    }
  • 重新构建项目,生成新的.aab文件后再上传到Google Play即可。

另外提醒:Google Play目前对Target SDK版本有强制要求,比如2024年起要求至少为34,如果你当前的compileSdk是33,也可以考虑升级compileSdk到34,同时把targetSdkVersion设为34,避免后续上传再遇到版本合规问题。

内容的提问来源于stack exchange,提问作者Duliba Ionut

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 07:13:16