skip to Main Content

I just created a new flutter project with no dependencies added and I’m getting this errors

`* What went wrong:
A problem occurred evaluating project ‘:app’.

Could not initialize class com.android.build.gradle.internal.crash.PluginCrashReporter`

`

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 10.0.19043.2251], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[!] Android toolchain - develop for Android devices (Android SDK versio
n 32.0.0)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.73.1)
[√] Connected device (4 available)
[√] HTTP Host Availability

`
…and as you can see from my flutter doctor, everything looks fine and okay. Can someone please help me on this because I actually can’t figure it out. Thank You.

I have tried upgrading the gradle but I’m still not getting a good result

2

Answers


    1. Try to deleted .gradle caches by typing this in terminal rm -rf $HOME/.gradle/caches/ if error still exist proceed to step 2

    2. Try the command with –scan,it could be ~/.android was owned by root, so your build (launch by my user) failed to read/write into this directory.

    Solution: sudo chown -R you:you ~/.android

    Login or Signup to reply.
  1. Accept Your Android licenses usinge this command

    flutter doctor --android-licenses

    After that accept all

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