I have a problem in Android Studio when trying to run the project, I get this error
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 download builder.jar (com.android.tools.build:builder:3.5.0) Could
not get resource
'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar'.
Premature end of Content-Length delimited message body (expected:
8174407; received: 4456416 Could not download bundletool.jar
(com.android.tools.build:bundletool:0.9.0) Could not get resource
'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.jar'.
Premature end of Content-Length delimited message body (expected:
5248142; received: 4456416
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 19m 23s Finished with error: Gradle task assembleDebug
failed with exit code 1
Yes. Its a VPN issue. Please disconnect VPN and try, it worked for me.
Related
i'm creating a payment gateway in my app using razor pay but app build faild
`FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.razorpay:checkout:1.6.+.
Required by:
project :app > project :razorpay_flutter
> Failed to list versions for com.razorpay:checkout.
> Unable to load Maven meta-data from https://www.jitpack.io/com/razorpay/checkout/maven-metadata.xml.
> Could not GET 'https://www.jitpack.io/com/razorpay/checkout/maven-metadata.xml'. Received status code 521 from server:
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 53s
Exception: Gradle task assembleDebug failed with exit code 1`
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom
- https://repo.maven.apache.org/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom
- https://storage.googleapis.com/download.flutter.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom
Required by:
project :app > project :flutter_pdfview
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 26s
Exception: Gradle task assembleDebug failed with exit code 1
I had the same problem until I added jcenter() in my project-level build.gradle file, you do the same, and voila!! it will work
Same problem here, it seems like they changed some files in the API but they didn't solve it in the package.
I tried to visit the next URL for example, and I've reached the following path
https://repo.maven.apache.org/maven2/com/github/barteksc
where I noticed that the files have changed.
I added the SMS library in the Flutter but after compile flutter returns this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':sms'.
> Could not resolve all artifacts for configuration ':sms:classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.1.
Required by:
project :sms
> Could not resolve com.android.tools.build:gradle:3.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'. Received status code 403 from server: Forbidden
> Could not get unknown property 'android' for project ':sms' 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 3s
Exception: Gradle task assembleDebug failed with exit code 1
What can I do in this situation?
Thanks in advance!
sina you are connecting from iran and we are banned by google... use a VPN... i recommend proton
[Fatal Error] gradle-3.5.0.pom:2:1: Content is not allowed in prolog.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
Could not resolve all artifacts for configuration ':flutter_plugin_android_lifecycle:classpath'.
Could not resolve com.android.tools.build:gradle:3.5.0.
Required by:
project :flutter_plugin_android_lifecycle
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
> Content is not allowed in prolog.
Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' 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 1m 27s Exception: Gradle task assembleDebug failed
with exit code 1
Just Go to Your Project root Folder ,
than go to Android -> Gradle -> Delete Gradle FOlder
Now Restart the Project . It will solve your Problem
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