Home > Net >  my new flutter app created is not working on my android device version 8
my new flutter app created is not working on my android device version 8

Time:11-14

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

CodePudding user response:

  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

CodePudding user response:

Accept Your Android licenses usinge this command

flutter doctor --android-licenses

After that accept all

  • Related