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.
Related
I am trying to run my flutter project but facing this issue.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':audio_session'.
> Could not load compiled classes for build file 'C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\audio_session-0.1.6+1\android\build.gradle' from cache.
* 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
I have tried deleting audio_session-0.1.6+1 from the path C:\flutter_2.5.2\.pub-cache\hosted\pub.dartlang.org\ but it didn't work. It is creating the package folder again and again when I build the APK.
I installed flutter a few moments ago but I get this error when I want to run the flutter project:
Building with sound null safety
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:4.1.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.0/gradle-4.1.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 5s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 6.9s
Gradle task assembleRelease failed with exit code 1
ScreenShot
Post your build gradle file. Most likely you added classpath 'com.android.tools.build:gradle:4.1.0 in the wrong place. it should be added to android/build.gradle and not to android/app/build.gradle
Should look like this:
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
.
.
.
}
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
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.google.firebase:firebase-analytics:.
Required by:
project :app
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 45s
Exception: Gradle task assembleDebug failed with exit code 1
I am not really sure but try to :
Set your java SDK location in project settings
upgrade your buildToolsVersion in your build.gradle file. See which version is the latest and set it to that.
If neither of these methods work , save your project in a repository and re-download android studio if it comes to that.
You can even visit this thread and see if any of the methods solve your problem : Execution failed for task ':app:compileDebugJavaWithJavac' Android Studio 3.1 Update
App was working completely fine but suddenly it is invoking the following issue.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':google_sign_in:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':google_sign_in:debugCompileClasspath'.
> Could not resolve project :google_sign_in_web.
Required by:
project :google_sign_in
> Unable to find a matching configuration of project :google_sign_in_web:
- None of the consumable configurations have attributes.
* 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 2s
Finished with error: Gradle task assembleDebug failed with exit code 1
I have imported the latest google_sign_in package in pubspec.yaml but still facing the same build failed error. Any help please!
Solved it by running following command in flutter terminal:
flutter pub cache repair
All of the packages were downloaded and re-installed again.