The issue appears to be related to the version and/or configuration of Java in use. Ensure Java 11 is installed and configure JAVA_HOME to point to its location. To use an embedded JDK with Android Studio, it can be changed under File > Project Structure > SDK Location. Try cleaning Gradle by running flutter clean, and deleting the .gradle folder. The gradle-wrapper.properties can be replaced with a compatible gradle version by uncommenting and altering the line below. Do a fresh install of Android SDK Platform 34 using Android Studio and recreate the Android emulator if necessary. This should fix it.