0

can someone tell me why i keep having this bug in android studio , i installed the latest gradle and still can't fix it and also i ran flutter doctor -v , the output is below .i also tried flutter clean but couldn't find the rebuild option . here's the error log :

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 37s
Exception: Gradle task assembleDebug failed with exit code 1

here is my flutter doctor -v output :

[√] Flutter (Channel master, 2.3.0-13.0.pre.145, on Microsoft Windows [Version
10.0.19041.985], locale en-CA)
• Flutter version 2.3.0-13.0.pre.145 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fdb1fb184d (3 days ago), 2021-05-24 22:04:02 -0700
• Engine revision b1385c0df1
• Dart version 2.14.0 (build 2.14.0-145.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X cmdline-tools component is missing
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more
      details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.2.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • 

    Android
          8.0.0 (API 26) (emulator)
        • Chrome (web)                       • chrome        • web-javascript • Google
          Chrome 90.0.4430.212
        • Edge (web)                         • edge          • web-javascript • Microsoft
          Edge 90.0.818.66
    
    ! Doctor found issues in 1 category.
shrooma
  • 53
  • 1
  • 7

1 Answers1

0

Try running flutter doctor --android -licenses in flutter console and accept the licenses.

Mohamed Karkotly
  • 1,364
  • 3
  • 13
  • 26
Moh Say 21
  • 81
  • 1
  • 1
  • 5
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 17 '21 at 13:25