AGP version reverts from 8.2.1 to 8.1.0 on Windows (Local Build/Downloaded Code)

Integrations

Hi FlutterFlow Community,

I'm encountering an issue when trying to build my FlutterFlow project locally on Windows. I'm attempting to update the Android Gradle Plugin (AGP) version for com.android.application from the default (which seems to be 8.1.0) to 8.2.1.

The Problem: After I manually change the AGP version in the Gradle files to 8.2.1 and try to run or build the project, the version seems to automatically revert back to 8.1.0 during the build process, or the build fails referencing version 8.1.0 again.

What I've Tried:

  1. Downloading Code/Using Local Run: I've downloaded the project code (or am using the Local Run feature).

  2. Editing Gradle Files: I have manually modified the following files in the android directory to set the version to 8.2.1:

    • settings.gradle (in the pluginManagement { plugins { ... } } block for id 'com.android.application' version '8.2.1' apply false)

    • app/build.gradle (in the plugins { id "com.android.application" version "8.2.1" } block)

    • build.gradle (for the buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.2.1' } })

  3. Cleaning Project: I've run flutter clean and deleted the .gradle folder in the android directory before attempting to build again.

  4. Timing of Edit: I've tried making these changes immediately before running the build.

Despite these steps, the project seems to ignore the 8.2.1 setting and reverts or refers back to 8.1.0.

My Question:

  • Is there a specific way within FlutterFlow's workflow or recommended best practice to set a custom AGP version (like 8.2.1) for local builds on Windows that ensures the setting persists and is used?

  • Am I missing a configuration step, or is FlutterFlow overwriting these changes during its build preparation phase for local runs?

  • Has anyone else encountered this and found a reliable solution or workaround?

Any guidance or insights on how to successfully update and maintain the AGP version for a FlutterFlow project being built locally on Windows would be greatly appreciated!

Thank you!

What have you tried so far?

After I manually change the AGP version in the Gradle files to 8.2.1 and try to run or build the project, the version seems to automatically revert back to 8.1.0 during the build process, or the build fails referencing version 8.1.0 again.

Did you check FlutterFlow's Documentation for this topic?
Yes
6
6 replies