Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting this error in flutter after import flutter_pdfview package

Tags:

flutter

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
like image 557
Avinash Roy Avatar asked Sep 05 '25 03:09

Avinash Roy


2 Answers

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

like image 146
Toyyibat Abdulkareem Avatar answered Sep 07 '25 20:09

Toyyibat Abdulkareem


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.

like image 37
ahmad zabadnee Avatar answered Sep 07 '25 20:09

ahmad zabadnee