Description
The project encountered synchronization errors when attempting to update the Android Gradle Plugin (AGP) version. After modifying the build.gradle file to use AGP 8.7.2, the project failed to sync due to incompatibility between the AGP and the current Gradle version 8.6. The minimum required Gradle version for AGP 8.7.2 is 8.9.
This issue blocks the project from building and prevents updates or releases to be published in Google Play.
To Reproduce
Steps to reproduce the behavior:
- Open the project in Android Studio.
- Modify the
build.gradle file:
id 'com.android.application' version '8.7.2' apply false
id 'com.android.library' version '8.7.2' apply false
- Attempt to sync the project.
- Observe the synchronization error: "Minimum supported Gradle version is 8.9. Current version is 8.6."
Proposed Solution
-
Update the gradle-wrapper.properties file:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
-
Delete any cached Gradle distributions to avoid conflicts:
rm -rf ~/.gradle/wrapper/dists/gradle-8.9-all
-
Resynchronize the project in Android Studio:
- Navigate to File > Sync Project with Gradle Files.
Why It's Important
- Compatibility: The AGP 8.7.2 requires Gradle 8.9 or higher to function.
- Security: Ensures that the Gradle distribution matches its official checksum to prevent using a tampered version.
- Publishing: Without the fix, the project cannot build or release updates to Google Play Console.
Others
- Device: Development Environment
- Android Version: Not applicable
- App Version: Current development version
- Downloaded From: Development Environment
Description
The project encountered synchronization errors when attempting to update the Android Gradle Plugin (AGP) version. After modifying the
build.gradlefile to use AGP 8.7.2, the project failed to sync due to incompatibility between the AGP and the current Gradle version 8.6. The minimum required Gradle version for AGP 8.7.2 is 8.9.This issue blocks the project from building and prevents updates or releases to be published in Google Play.
To Reproduce
Steps to reproduce the behavior:
build.gradlefile:Proposed Solution
Update the
gradle-wrapper.propertiesfile:Delete any cached Gradle distributions to avoid conflicts:
rm -rf ~/.gradle/wrapper/dists/gradle-8.9-allResynchronize the project in Android Studio:
Why It's Important
Others