FAILURE: Build failed with an exception.I get this error - flutter

I went through all the threads but couldn't solve the problem. I keep getting this error every time I run the project.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':barcode_scan2:generateDebugProto'.
protoc: stdout: . stderr: D:\Yeni klasor\flutter.pub-cache\hosted\pub.dartlang.org\barcode_scan2-4.2.1\protos: warning: directory does not exist.
Could not make proto path relative: D:\Yeni klasor\flutter.pub-cache\hosted\pub.dartlang.org\barcode_scan2-4.2.1\protos\android_configuration.proto: No such file or directory
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 13s
Exception: Gradle task assembleDebug failed with exit code 1

Related

Script 'C:\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159 flutter

Since yesterday, when I try to run my Flutter project, I encounter the following error. But when I don't use Hive and Hive_Flutter package, this error is solved. Thank you for helping me.
Script 'C:\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Flutter\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 12s
Exception: Gradle task assembleDebug failed with exit code 1

Getting an error white running flutter application "FAILURE: build failed with an exception"

I am getting an error while running my flutter application through vscode the error "FAILURE: build failed with an exception"
I attach the full error below.
Since I am new to this environment I don't know about this, please help me, Thank you!
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1256
* What went wrong:
Could not determine the dependencies of task ':app:compileFlutterBuildDebug'.
> Index 1 out of bounds for length 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 18s
Exception: Gradle task assembleDebug failed with exit code 1

When I try run a cloned flutter project. I get this exception > Execution failed for task ':app:compileFlutterBuildDebug'

FAILURE: Build failed with an exception.
Where:
Script '/home/joker/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/home/joker/snap/flutter/common/flutter/bin/flutter'' 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 48s
Exception: Gradle task assembleDebug failed with exit code 1

Execution failed for task path_provider:parseDebugLibraryResources

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':path_provider:parseDebugLibraryResources'.
Could not resolve all files for configuration ':path_provider:androidApis'.
Failed to transform file 'android.jar' to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}
Execution failed for PlatformAttrTransform: C:\Users\Jay Prajapati\AppData\Local\Android\sdk\platforms\android-28\android.jar.
Cannot parse result path string:
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 9s
Gradle task assembleDebug failed with exit code 1

Could not run Flutter app after a long time

i have developed an application before two months, i need to add a new feature today so i opened the project to day. but i cannot compile the project , it throws errors only and i don't understand how to resolve it. i have cached_network_image , youtube_player_flutter packages.
i have pasted my error log below
Compiler message:
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/youtube_player_flutter-
5.2.0/lib/src/player/raw_youtube_player.dart:55:30: Error: Getter not found: 'suspending'.
case AppLifecycleState.suspending:
^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/flutter/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line:
780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/flutter/Developer/flutter/bin/flutter'' 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 23s
FAILURE: Build failed with an exception.
* What went wrong:
Could not get unknown property 'ANDROIDX_WARNING' for project ':youtube_player' of type
org.gradle.api.Project.
* 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 23s
Finished with error: Gradle task assembleDebug failed with exit code 1