Reputation: 1
I’m upgrading my Flutter project from version 3.24.1 to 3.27.0 using FVM (Flutter Version Management). After switching to the new version and running the project, I encountered the following issues:
Error Messages:
Execution failed for task ':app:processDevelopmentDebugResources'
Steps Taken So Far:
Updated Flutter version using fvm use 3.27.0
.
Updated dependencies in pubspec.yaml
to the latest versions.
Ran flutter pub get
and flutter clean
.
Tried running the project again but encountered Gradle errors.
Relevant Code and Configuration:
android/build.gradle
:
gradle
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
android/app/build.gradle
:
gradle
android {
compileSdkVersion 33
// other configurations...
}
Error Logs:
* What went wrong:
Execution failed for task ':processDevelopmentDebugResources'.
> Could not resolve all files for configuration ':path_provider:detachedConfiguration1'.
> Could not find com.android.tools.build:gradle:7.2.0.
Searched in the following locations:
Upvotes: 0
Views: 129
Reputation: 36
Open Preferences/Flutter
provide the current project Flutter SDK path as the path for you fvm default.
/Users/fvm/default
- This is mine.
Find your fvm folder and just copy the path of default and paste it in Flutter SDK path
. If all is done correctly you will see this written below the path:
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
NOTE: When using fvm and running cmds, start every command with fvm.
Ex. - fvm flutter pub get
fvm flutter clean
Upvotes: 0