1

Recently i upgraded my flutter project to support flutter sdk version 3.22.x, i was using Android studio Hedgehog. It worked fine.

After project upgrade, i updated the android studio from Hedgehog to Koala, now i am not able to run the flutter project, getting this error:

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDevDebug'.
> A problem occurred starting process 'command '/Users/username/development/flutter/bin/flutter''

I have different flavors in this application, other project that don't have flavors works fine.

I have tried:

  • Deleting pubspec.lock, clean, pub get and build again
  • Invalidate cache and restart
  • flutter pub cache repair
  • Also tried this option, but i don't find any dart related error in the code.
2
  • Try this : stackoverflow.com/questions/61930007/… Commented Jun 25, 2024 at 10:25
  • @SumitBanwakade I tried, but it didn't work, so for now i have rolled back to Android studio Hedgehog. Thanks. Will check it in the future. Commented Jun 27, 2024 at 7:04

1 Answer 1

4

Finally, I was able to fix the issue, with Android Studio Koala.

Here's the fix that worked for me, in case anyone is looking for the solution, can give this a try.

In gradle-wrapper.properties file, distribution url needs to be set as follows:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

And in settings.gradle file, I updated AGP version and Kotlin version as follows:

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "7.3.1" apply false
    id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.