mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Sum of changes is: cherry pick of https://github.com/flutter/flutter/pull/154757 Merge manual application of of https://github.com/flutter/flutter/pull/154945 manual application of https://github.com/flutter/flutter/pull/154967 Copied form below from automatic label (this is a cherry pick of https://github.com/flutter/flutter/pull/154757). ### Issue Link: What is the link to the issue this cherry-pick is addressing? Fixes https://github.com/flutter/flutter/issues/154371. ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes a crash when building Flutter modules for android with `flutter build aar`, when using Android Gradle Plugin 8.0+. ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) Fixes the mentioned crash when building a module as an aar with Android Gradle Plugin 8.0+. ### Workaround: Is there a workaround for this issue? No. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Build a module: 1. `flutter create foobar --template=module` 2. `cd foobar` 3. Edit the `.android/build.gradle` to use AGP 8.1. 4. `flutter run`/`flutter build aar`