I have tried changing the SDK version but nothing works. So, I updated the android gradle plugin and wrapper to 8.0+ and it works. Here is the detailed reason from this answer migrate your build gradle
Here is my updated AGP in my android/settings.gradle
id "com.android.application" version "8.1.1" apply false
That update made my flutter 3.19 running smoothly again