Open Bizarrus opened 2 months ago
Thanks for the issue. I'm not familiar with this area, so I'll defer to others :)
Could you let us know your Flutter version and setup by sharing the output of flutter doctor --verbose
?
@bartekpacia Do you have any ideas here? Perhaps this older migration guide needs to link somewhere else, mention another file, or include another potential solution?
Thanks for the ping @parlough :)
The Flutter Fix (and the migraton guide) should also mention the newer, modern place where Kotlin version is configured - in the android/settings.gradle
file, in the plugins {}
block, as explained here, eg:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.22" apply false
}
The Flutter Fix (and the migraton guide) should also mention the newer, modern place where Kotlin version is configured - in the
android/settings.gradle
file, in theplugins {}
block, as explained here, eg:
So the definition of the version no longer runs via the variable ext.kotlin_version
, but directly as mentioned in the plugin section as Depencies?
From which version is this behavior like this? There is no information on this.
Perhaps you should adapt the warning message and the URL referred to there to this effect, as this simply leads to misunderstandings: you are searching for the variable to death.
This is very confusing, especially for new flutter developers like me: You install the very latest version and start with it, but you get old error messages that have to be handled completely differently in the current version. Especially here, you don't think about the fact that you have to fall back on a migration guide because you are using the latest version.
I'm sorry for your bad experience. It's a huge project and when some part is updated (as in this case), it's hard to know about all the other places where it's referred. Thanks for reporting it.
So the definition of the version no longer runs via the variable ext.kotlin_version, but directly as mentioned in the plugin section as Depencies?
This is correct.
From which version is this behavior like this?
I think since Flutter 3.16. To see how default Gradle buildscripts differ across Flutter versions, take a look at this issue. If you have generated your project with an older version of Flutter, it's advisable to upgrade your buildscripts to the newest form.
If you have any further problems let me know, I'll do my best to help.
Okay, like commit #0984a7f (two weeks ago), the messages was changed:
I think, the changes are currently not on the VS Code
-Plugin.
My Version is:
Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (2 weeks ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1
I think, the changes are currently not on the VS Code-Plugin.
FYI, this is unrelated to Flutter VSCode plugin.
The bug is inside flutter_tools
package, which is basically the flutter
command-line program.
Page URL
https://docs.flutter.dev/release/breaking-changes/kotlin-version/
Page source
https://github.com/flutter/website/tree/main/src/content/release/breaking-changes/kotlin-version.md
Describe the problem
I've get following error:
But
ext.kotlin_version
never exists in<Project>\android\build.gradle
:<Project>\android\app\build.gradle
:Expected fix
No response
Additional context
No response
I would like to fix this problem.