run the app for first time have this error - flutter

i am begginer
i try to play an app in android studio but I cant and showed me this error.
can you help me?
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find builder.jar (com.android.tools.build:builder:3.5.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar
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 3s
Exception: Gradle task assembleDebug failed with exit code 1

Related

I deleted some of my files in my C-drive after that my flutter project is not running and showing this exception

FAILURE: Build failed with an exception.
Where:
Settings file 'C:\Users\hassa\development\GIFT-Transport-Management-System\gtms\android\settings.gradle' line: 11
What went wrong:
A problem occurred evaluating settings 'android'.
Failed to deserialize script metadata extracted for script 'C:\flutter\flutter\packages\flutter_tools\gradle\app_plugin_loader.gradle'
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 4s
Exception: Gradle task assembleDebug failed with exit code 1
I tried to delete some of the files.

error after icon style in flutter android studio

i tried to style my app icon in android studio by
going to -open android module , ---new windows - app-res-image asset
but after resizing image i got this error. and also image asset is not available any more.
where did i go wrong? what can i do ?
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:7.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom
Required by:
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 1s
Exception: Gradle task assembleDebug failed with exit code 1

After migration of this old project I'm getting this error and I have tried a lot of ways

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.0-runtime (com.google.android.exoplayer:exoplayer-core:2.17.0) and jetified-exoplayer-ui-2.15.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.15.1)
Go to the documentation to learn how to Fix dependency resolution errors.
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 2m 52s
Exception: Gradle task assembleDebug failed with exit code 1
The old project after migration shows this.

this error happened when I run flutter project in vscode how can i solve this problem?

Launching lib\main.dart on Android SDK built for x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find annotations-27.1.0.jar (com.android.tools:annotations:27.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/annotations/27.1.0/annotations-27.1.0.jar
> Could not find databinding-common-4.1.0.jar (androidx.databinding:databinding-common:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/4.1.0/databinding-common-4.1.0.jar
> Could not find baseLibrary-4.1.0.jar (com.android.databinding:baseLibrary:4.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/4.1.0/baseLibrary-4.1.0.jar
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Is there any solution for this Error running Gradle problem?

When I try to run any of my flutters project I face this issue
console:
Error running Gradle:
ProcessException: Process "C:\Users\User\Downloads\flutter_app\android\gradlew.bat" exited abnormally:
Configure project :app
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 36
What went wrong:
A problem occurred evaluating script.
FlutterPlugin
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 1s
Command: C:\Users\User\Downloads\flutter_app\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.