I have two recommendations for this issue, also did you try flutter run
or did you just try ./gradlew build
?
1st Recommendation:
Run flutter clean
then try to sync the Gradle version in android/gradle/wrapper/gradle-wrapper.properties
to the latest available build.
Right now, I'm using gradle-8.5-all.zip
on Flutter 3.29.2
If the 1st recommendation doesn't work, I recommend re-building the android folder, many times when I was building on iOS when I switched back to Android on a specific project that helped too, I've had some problems with versioning. Simply re-building the Android folder could solve the issue:
2nd recommendation:
Delete android/
Run flutter create --platforms=android .
Lastly, if this doesn't help can you please provide flutter doctor
?