androidflutterdartgoogle-play-console

Update you target sdk version to Android 15 api level before August 31, 2025


Action by Aug 31 Update your target API level by August 31, 2025 to release updates to your app We've detected that your app is targeting an old version of Android. To provide users with a safe and secure experience, Google Play requires all apps to meet target API level requirements.

From August 31, 2025, if your target API level is not within 1 year of the latest Android release, you won't be able to update your app.

I have change my API level on Android/app/build.gradle and uploaded in Google Play Console. Still this shows warning in play console I don't know why. Where should I change so it works. In all other apps it is working but only in my this app the play console is giving errors.

Android/app/build.gradle

buildscript {
     ext.kotlin_version = "2.1.0"
   repositories {
    google()
    mavenCentral()
    maven { url 'https://plugins.gradle.org/m2/' }
}
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.android.tools.build:gradle:8.3.0'

    }
}

plugins {
    id "com.android.application"
    // START: FlutterFire Configuration
    id 'com.google.gms.google-services'
    // END: FlutterFire Configuration
    id 'kotlin-android'
    id "dev.flutter.flutter-gradle-plugin"
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

}

android {
    namespace = "com.arleven.sabjiking"
    compileSdk = 36
    ndkVersion = flutter.ndkVersion
    

    compileOptions {
        coreLibraryDesugaringEnabled true
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }

    defaultConfig {
        applicationId = "com.arleven.sabjiking"
        multiDexEnabled true
        minSdk = 26
        targetSdk = 36
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }
    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
            storePassword keystoreProperties['storePassword']
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            shrinkResources false
        }
    }

    viewBinding {
        enabled = true
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0"
    implementation 'com.onesignal:OneSignal:[5.0.0, 5.99.99]'
    
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' 
    
}



flutter {
    source = "../.."
}

Please let me know if i need to change Target sdk version in any other file Help me I have to upload build as soon as possible


Solution

  • You have updated the API Level to 36 and uploaded to Play Console but still getting the error message. This can happen if some of your active test/production track still contains the older version of app.

    The solution is to update each of the tracks that are active with the latest version that you have fixed and uploaded. You don't have to upload bundled file for each track. Just in the upload menu yo need to select add from library and select the latest version of app. You must do this for each active track. This will fix the issue.