I have installed flutter by following all the steps. When I create a new project in Visual studio I can run it on Chrome. However, when I try to run it on an android device I keep getting ':app:compileFlutterBuildDebug' error.
Here is the output:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'F:\f\bin\flutter.bat'' finished with non-zero exit value -1073741795
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 48s Running Gradle task 'assembleDebug'...
I tried running .\gradlew clean build in the android folder. And here is the output:
> Task :app:compileFlutterBuildDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'F:\f\bin\flutter.bat'' finished with non-zero exit value -1073741795
* 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 45s
7 actionable tasks: 2 executed, 5 up-to-date
Here is the output for flutter doctor -v
[√] Flutter (Channel stable, 3.19.3, on Microsoft Windows [Version 10.0.19045.4046], locale en-IN)
• Flutter version 3.19.3 on channel stable at F:\f
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ba39319843 (8 days ago), 2024-03-07 15:22:21 -0600
• Engine revision 2e4ba9c6fb
• Dart version 3.3.1
• DevTools version 2.31.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at F:\androidsdk
• Platform android-34, build-tools 34.0.0
• Java binary at: F:\Android\android studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2023.1)
• Android Studio at F:\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 17.0.7+0-b2043.56-10550314)
[√] VS Code (version 1.87.2)
• VS Code at C:\Users\chaitanya\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.84.0
[√] Connected device (4 available)
• moto g32 (mobile) • 192.168.29.6:37385 • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4046]
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.129
• Edge (web) • edge • web-javascript • Microsoft Edge 122.0.2365.92
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.