could not resolve all dependencies for configuration ':classpath' on flutter - android

hi recently I upgrade and flutter to v2 and my android studio too but after that my flutter app gives a Gradle error and cant be extracted I tried too hard to do many solutions like but maven in dependency but it still gives an error.the gradle version is now 5.6 or something and one more thing all the application running well still which i made before upgrade and its gradle version is
Please help me out and the error is given below.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not load module metadata from C:\Users\dell.gradle\caches\modules-2\metadata-2.96\descriptors\com.android.tools\annotations\27.1.0\11cd36a7dcab7d14d0c14c5e6c7582e3\descriptor.bin
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 20s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Related

Gradle Issue in Android Studio

Extracted the android package from ionic project, opened it in Android Studio,
Distribution URL : https\://services.gradle.org/distributions/gradle-7.4-all.zip
Inside Project level build.gradle : classpath 'com.android.tools.build:gradle:7.4'
Inside cash.properties : gradle.version=7.4
Getting below error in Android Studio :
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 com.android.tools.build:gradle:7.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.4/gradle-7.4.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/7.4/gradle-7.4.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 746ms
What might be the Issue ?
From what i've seen here, version 7.4 is not yet available on Google maven repositories.
You could try targeting a lower version (like 7.3.0-alpha05, or 7.1.2 if you need stable release), and don't forget to set the same version to your distributionUrl.

why I have this error when I try to build apk of the project in flutter 'wrong Could not resolve all dependencies for configuration ':classpath'.'?

I followed a tutorial to install flutter with vs code now when I try to build the project apk je encounters this error below:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not load module metadata from C:\Users\Adeol\.gradle\caches\modules-2\metadata-2.96\descriptors\com.android.tools.ddms\ddmlib\27.1.0\11cd36a7dcab7d14d0c14c5e6c7582e3\descriptor.bin
* 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
when I created a new project in flutter I wanted to test to see if it works with the default code in main.dart but I have this error above. Of course I searched on google and YouTube I tried to modify the version of the Gradle but without hope. Can you help me please?

Flutter : A problem occurred configuring project ':speech_to_text'

I tried all possible way but didn't find how to configure " speech_to_text" in my existing flutter project.
Independent speech to text app working fine but i am not able to integrate in my existing app.
below steps i did still no luck :
Internet and record audio permission in Android manifest.
adding latest dependencey in pubspec.yaml speech_to_text
import 'package:speech_to_text/speech_to_text.dart' as stt;
stt.SpeechToText _speec = stt.SpeechToText();
5 . I change gradle version also which is same gradle version of woking "speech to text" app but independently
and i get below error
Log :
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':speech_to_text'.
Failed to create Jar file C:\Users\jitkumar.gradle\caches\jars-8\c58c0f61a1162f88da75275a98d7f55b\auto-value-1.5.2.jar.
Could not get unknown property 'android' for project ':speech_to_text' 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
Thanks

Build failed with some exception in flutter

suddenly while starting my app in visual studio code, i got the following lines as errors..
Launching lib\main.dart on RMX1801 in debug mode...
* Error running Gradle:
ProcessException: Process "C:\Users\sanjay\demo\android\gradlew.bat" exited abnormally:
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 com.android.tools.build:gradle:6.0.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.0.1/gradle-6.0.1.pom
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.0.1/gradle-6.0.1.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/6.0.1/gradle-6.0.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/6.0.1/gradle-6.0.1.jar
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 39s
Command: C:\Users\sanjay\demo\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
Exited (sigterm)
can anyone tell me how to resolve this issue.
I think this version of gradle not supported just use an other version by changing class path in my case:
dependencies {
classpath'com.android.tools.build:gradle:3.2.1' }

Unable to run flutter sample in android studio

i am new in flutter i just want to start it with android studio
but when i am just try to the simple app it shows me some error
can some one help me
Error running Gradle:
Exit code 1 from: C:\Users\saswatsaubhagya\Desktop\flutter\flutter_app\android\gradlew.bat app:properties:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\saswatsaubhagya\Desktop\flutter\flutter_app\android\app\build.gradle' line: 25
What went wrong:
A problem occurred evaluating project ':app'.
Could not resolve all files for configuration 'classpath'.
Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.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 39s
Finished with error: Please review your Gradle project setup in the android/ folder.
timeout waiting for the application to start

Categories

Resources