Jdk-23 will not work. Try jdk17 or jdk11 of jetbrains (android studio).
Further more:
1- Clean flutter and generated build files in your projects android side.
If it does not work then:
1-Update your flutter version, dart version and your .yaml dependencies.
2- Clean flutter and generated build files in your projects android side.
If it does not work and you have not done gradle migration:
1-You should change settings.gradle, build build.gradle and app build.gradle according to documentation. https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply ( Alternatively you can update your (1)android studio and (2)flutter plugin of android studio to create a new flutter project. (3)Then compare files that I stated. ( java and kotlin versions stated in documentation))
2- Clean flutter and generated build files in your projects android side.