Gradle is throwing an error while downloading the artifacts - android

Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve net.minidev:json-smart:[1.3.1,2.3].
Required by:
project :app > project :stripe_payment > com.stripe:stripe-android:10.4.6 > com.stripe:stripe-3ds2-android:1.2.2 > com.nimbusds:nimbus-jose-jwt:7.8
Failed to list versions for net.minidev:json-smart.
Unable to load Maven meta-data from https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml.
Could not get resource 'https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml'.
Could not GET 'https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
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
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1
The gradle is not building properly and as a result the program crashes. I have tried all the methods below
deleting gradle wrapper jar file
updating the gradle version (Distribution url )
maven central replacing

Related

Build Android Fail when using cordova-plugin-mfp-push

Plugin Version : 8.0.2021062405
When ever i run ionic cordova build android with cordova-plugin-mfp-push plguin installed i am getting the below error mentioned.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\anis.khalfaoui\Desktop\ProxymProjects\kgoc-frontend\platforms\android\app\build.gradle' line: 102
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all artifacts for configuration 'classpath'.
> Could not resolve com.android.tools.build:gradle:+.
Required by:
unspecified:unspecified:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://dl.bintray.com/kotlin/kotlin-eap/com/android/tools/build/gradle/maven-metadata.xml. > Could not get resource 'https://dl.bintray.com/kotlin/kotlin-eap/com/android/tools/build/gradle/maven-metadata.xml'.
> Could not GET 'https://dl.bintray.com/kotlin/kotlin-eap/com/android/tools/build/gradle/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
* 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 1m 15s
C:\Users\anis.khalfaoui\Desktop\ProxymProjects\kgoc-frontend\platforms\android\gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
this is the line 102 in Build file 'C:\Users\anis.khalfaoui\Desktop\ProxymProjects\kgoc-frontend\platforms\android\app\build.gradle'
apply from: "../cordova-plugin-mfp-push/ibm-build-extras.gradle"
As you see in error message, you have provided + for com.android.tools.build:gradle version in build.gradle file.
Please provide complete version like com.android.tools.build:gradle:4.0.0.
That should resolve your issue.
Thanks

Could not resolve com.google.android.gms:play-services-ads-identifier:12.0.1

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-ads-identifier:12.0.1.
Required by:
project :app
> Skipped due to earlier error
> Could not resolve com.google.android.gms:play-services-ads-identifier:12.0.1.
Required by:
project :app > com.onesignal:OneSignal:3.15.3
> Skipped due to earlier error
* 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 3m 7s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I face this error 1 week please help me everyone my project was build from flutter 1.2.3
and I need to upgrade it because currently it's not working the problem is onesignal and firebase version not fit. Please give me any answer I need to complete this for my company I just in flutter internship

How to solve "Could not determine the dependencies of task ':app:compileReleaseKotlin'." in flutter

I try to build my flutter project, last month it was fine when I was doing flutter build apk but when I do flutter build apk for now.. I get this error log
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseKotlin'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
* 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 21s
and here is build.gradle: https://gist.github.com/wahyu-handayani/b38f1cc491816c6dcfeb130ab42cdbef
and build.gradle inside android folder:
https://gist.github.com/wahyu-handayani/2ab88f81869ef9a0e1575a465847e608
is there a way to solve this ?

I have updated flutter and android studio. now any new dependencies are not installing

I am beginner in flutter and I have updated flutter and android studio. now any new dependencies are not installing.
When try to build it gives fallowing error.
Note: C:\Users{user
name}AppData\Local\Pub\Cache\hosted\pub.dartlang.org\flutter_tts-2.1.0\android\src\main\java\com\tundralabs\fluttertts\FlutterTtsPlugin.java
uses or overrides a deprecated API. Note: Recompile with
-Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':flutter_tts:extractDebugAnnotations'.
Could not resolve all files for configuration ':flutter_tts:lintClassPath'.
Could not download lint-checks-27.1.1.jar (com.android.tools.lint:lint-checks:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/27.1.1/lint-checks-27.1.1.jar'.
> Tag mismatch!
Could not download kotlin-compiler-27.1.1.jar (com.android.tools.external.com-intellij:kotlin-compiler:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/27.1.1/kotlin-compiler-27.1.1.jar'.
> Tag mismatch!
Could not download uast-27.1.1.jar (com.android.tools.external.org-jetbrains:uast:27.1.1)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/27.1.1/uast-27.1.1.jar'.
> Tag mismatch!
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 1m 17s Exception: Gradle task assembleDebug failed
with exit code 1

Gradle upgrade to version 6.2.1 issues

I'm having problems upgrading my Gradle to version 6.2.1 I'm currently running android studio 3.6.1 I'm trying to do this because I kept getting an error that says Minimum supported Gradle version is 5.6.4. Current version is 4.10.2.
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.2.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.2.1/gradle-6.2.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/6.2.1/gradle-6.2.1.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 5s
Finished with error: Gradle task assembleDebug failed with exit code 1

Categories

Resources