Did you end up solving it? Just like you I am trying to use flutter 3.29 and I was getting this exact error.
I was upgrading a very old project from flutter 3.0.2 to a newer version and decided to upgrade to the latest version possible (3.29.0 at this time)
What worked for me was removing this form the build.gradle:
flutter {
source '../..'
}
and then going directly to the dependency (Geolocator 5.0.1+1 in my case) folder android/build.gradle and directly giving it version numbers:
android {
if (project.android.hasProperty("namespace")) {
namespace("com.baseflow.geolocator")
}
compileSdkVersion 34
// compileSdk flutter.compileSdkVersion
defaultConfig {
// minSdkVersion flutter.minSdkVersion
minSdkVersion 26
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
What the error says is that it isn't recognizing "flutter" that's because of the flutter.xversion type of code. It will probably be fixed in the dependency itself in the future, but that's what worked for me.