skip to Main Content

enter image description here

How can solve this for the flutter project ?

I’m expecting to run this on Android.

The error in text format (screenshot above):

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/sony/AndroidStudioProjects/userapp/android/settings.gradle' line: 24

* What went wrong:
Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.2']
> A problem occurred configuring project ':gradle'.
   > Could not read workspace metadata from /Users/sony/.gradle/caches/8.10/kotlin-dsl/accessors/988977859d9b6b0195278c1d04431d6c/metadata.bin

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 644ms
Error: Gradle task assembleDebug failed with exit code 1

2

Answers


  1. First Update com.android.application in settings.gradle file
    id "com.android.application" version "8.3.2" apply false

    After That come in gradle folder inside wrapper folder you’ll find gradle-wrapper.properties add this:-
    distributionUrl=https://services.gradle.org/distributions/gradle-8.4-all.zip

    Then Restart the IDE

    I hope this will work

    Login or Signup to reply.
  2. Same error but not find any answer 🙁

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search