flutteractionsbot 79bd2849d9
[CP-stable]fix: Android build fails when minSdk is set below 24 in build.gradle.kts (#173823) (#174132)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
https://github.com/flutter/flutter/issues/173823

### 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

On Android builds that do not use flutter.minSdkVersion and do use a value lower than 24 in a kotlin build file, correct flutters auto migration to update value with kotlin syntax. https://github.com/flutter/flutter/pull/173825 

### 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)

3.35 bumped the min android api level to api 24. We have an auto migrator to handle if users did not use flutter.minSdkVersion and did set an integer to auto update. The auto update logic produces a syntax error in kotlin build files but the matcher matches kotlin build files. CP is a good idea because 3.35 users are the most likley to be impacted. 

### Workaround:
Is there a workaround for this issue?

Manually edit build.gradle.kts

### 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?

Take flutter build that uses minsdk 22, update to flutter 3.35 and run flutter build apk.
2025-08-21 00:15:29 +00:00
..