1) What changed on Google Play?
From August 31, 2025, apps must target an API level within 1 year of the latest Android release. Practically, this means you need to target Android 15 (API 35) or higher to keep publishing updates.
2) Symptoms & error messages
When you try to build or run, you may see:
- Your app currently has compileSdk = 34 and targetSdk = 34.
- Gradle failure:
Cannot resolve external dependency com.google.gms:google-services:4.4.2 because no repositories are defined.
buildscript.repositories
block (with google()
/mavenCentral()
) is missing, so Gradle can’t download classpath plugins.3) Quick fix checklist
- Bump compileSdk and targetSdk to 35.
- Ensure Gradle Wrapper ≥
8.10
and AGP (Android Gradle Plugin) ≥8.6.0
. - Add
google()
andmavenCentral()
inside bothbuildscript.repositories
and top-levelallprojects.repositories
. - Update desugaring libs to the latest stable (
com.android.tools:desugar_jdk_libs
). - Clean, rebuild, and test on an Android 15 emulator/device.
- Upload AAB to internal testing, then promote to production.
4) App-level build.gradle
(module: app
)
Before (non-compliant)
android {
namespace = "com.pradeepthedeveloper.in"
compileSdk = 34
...
defaultConfig {
targetSdk = 34
...
}
}
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-auth:20.5.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}
After (compliant with API 35)
plugins {
id "com.android.application"
id "com.google.gms.google-services"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.pradeepthedeveloper.in"
compileSdk = 35
ndkVersion = "25.1.8937393"
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions { jvmTarget = "1.8" }
defaultConfig {
applicationId = "com.pradeepthedeveloper.in"
minSdk = 26
targetSdk = 35
versionCode = flutter.versionCode
versionName = flutter.versionName
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
debug {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
}
}
}
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-auth:20.5.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}
flutter { source = "../.." }
5) Project-level build.gradle
& repositories (fixes “no repositories are defined”)
That error happens when classpath plugins (e.g., com.google.gms:google-services
) can’t be fetched because the buildscript.repositories
block is missing.
Correct project-level build.gradle
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.6.0"
classpath "com.google.gms:google-services:4.4.2"
// Add Crashlytics/Perf if used:
// classpath "com.google.firebase:firebase-crashlytics-gradle:3.0.2"
// classpath "com.google.firebase:perf-plugin:1.4.2"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
google()
and mavenCentral()
under allprojects
but not under buildscript
, Gradle still fails for classpath dependencies. Make sure both are present.6) Gradle Wrapper & Android Gradle Plugin versions
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
Android Gradle Plugin (AGP)
classpath "com.android.tools.build:gradle:8.6.0"
AGP and Gradle must be compatible. The above combo works well for compile/targetSdk 35 in 2025.
settings.gradle
for plugin management. Keeping the classpath and repositories in the project build.gradle
as shown remains compatible and fixes resolution errors.7) Flutter commands & local verification
- Sync dependencies:
flutter clean flutter pub get
- Build locally:
flutter build appbundle # AAB for Play Store # or flutter build apk # For quick device testing
- Run on Android 15 device/emulator:
flutter run -d emulator-5554 # example device id
8) Play Console release checklist
- Target/compile SDK set to 35; project builds an .aab.
- Upload to Internal testing first; install and verify on Android 15.
- Resolve policy warnings (privacy, data safety, sensitive permissions).
- Promote to Production when stable.
- Confirm the Play Console inbox message that your app is now compliant.
9) FAQ & Troubleshooting
Q1) I see “Cannot resolve external dependency ... because no repositories are defined.”
Add google()
and mavenCentral()
inside both buildscript.repositories
and allprojects.repositories
in the project-level build.gradle
(see section 5).
Q2) Build fails after bumping to API 35.
- Update Gradle to
8.10
and AGP to8.6.0
. - Update desugaring libs to
2.0.4
. - Clean and rebuild. Check library release notes for Android 15 compatibility.
Q3) Do I have to change minSdk
?
No. The Play requirement is about targetSdk. You can keep your current minSdk
(26 in this example).
Q4) Does this affect existing installs?
Your current store listing remains live. You just won’t be able to publish updates after the deadline if you don’t target API 35 or higher.
Q5) Flutter-specific gotchas?
- Some plugins may need newer versions to support API 35.
- If you use background services/alarms, verify behavior on Android 15.
Copy-paste recap
- App-level
build.gradle
: setcompileSdk = 35
,targetSdk = 35
, update desugaring lib. - Project-level
build.gradle
: addbuildscript.repositories { google(); mavenCentral() }
and classpath deps; keepallprojects.repositories
too. - Gradle/AGP: Wrapper
8.10
, AGP8.6.0
. - Build & test: flutter clean → flutter pub get → flutter build appbundle → test on Android 15.
- Publish: Internal testing → Production in Play Console.