After upgrading to Flutter 3.3.7, and running "flutter pub outdated && flutter pub upgrade" I tried to build my app as usual. But then this showed up. "A problem occurred evaluating project ':flutter_downloader'". I added a new issue in https://github.com/fluttercommunity/flutter_downloader/issues/748 as well. Any ideas what could possibly go wrong? Thanks in advance.
DEBUG CONSOLE RESULTS: build type: release, signining with release config.. FAILURE: Build completed with 2 failures.
Failed to apply plugin class 'org.jlleitschuh.gradle.ktlint.KtlintBasePlugin'. Current version of plugin supports minimal Gradle version: 6.8
Where: Script '/Users/xx/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 474
What went wrong: A problem occurred configuring project ':flutter_downloader'.
Failed to notify project evaluation listener. Cannot invoke method substring() on null object com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle "
Flutter Doctor Results: (Mac Book Air 13" M1 processor )
[✓] Flutter (Channel stable, 3.3.7, on macOS 12.6 21G115 darwin-arm, locale en-US) • Flutter version 3.3.7 on channel stable at /Users/xx/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e99c9c7cd9 (33 hours ago), 2022-11-01 16:59:00 -0700 • Engine revision 857bd6b74c • Dart version 2.18.4 • DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/xx/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • ANDROID_HOME = /Users/xx/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14A400 • CocoaPods version 1.11.3
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.72.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.52.0
[✓] Connected device (3 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 31) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 12.6 21G115 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 107.0.5304.87
[✓] HTTP Host Availability • All required HTTP hosts are available
I followed this solution:
"Get a copy of the "\gradle"-folder from another working project (or create a new project)."
(from https://stackoverflow.com/a/70862628/16703736)
Changing the gradle-wrapper.properties to >6.8 fixed it.