'Getting this error in flutter after import flutter_pdfview package
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
Solution 1:[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
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Toyyibat Abdulkareem |
| Solution 2 | ahmad zabadnee |
