Error on APK build: Execution failed for task ':app:checkReleaseAarMetadata'.

Troubleshooting

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:checkReleaseAarMetadata'.

> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction

> An issue was found when checking AAR metadata:

1. Dependency 'androidx.metrics:metrics-performance:1.0.0-beta02' requires Android Gradle plugin 8.6.0 or higher.

This build currently uses Android Gradle plugin 8.1.0.

* Try:

> Run with --stacktrace option to get the stack trace.

> Run with --info or --debug option to get more log output.

> Run with --scan to get full insights.

> Get more help at https://help.gradle.org.

BUILD FAILED in 1m 38s

Gradle task assembleRelease failed with exit code 1

How can I fix this?

What have you tried so far?

Changing the SDK versions

Did you check FlutterFlow's Documentation for this topic?
No