flutter_cached_pdfview icon indicating copy to clipboard operation
flutter_cached_pdfview copied to clipboard

bug

Open OsamaNasserDev opened this issue 3 years ago • 3 comments

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

OsamaNasserDev avatar Apr 22 '22 19:04 OsamaNasserDev

I am also facing the same issue, any workaround so far?

image

mumairofficial avatar Apr 23 '22 16:04 mumairofficial

It worked for me after updating compiledsdkversion 31 add android.enableR8=true in gradle.properties changed

dependencies {
       classpath 'com.android.tools.build:gradle:4.1.0'
       classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
   }

in build.gradle

It is mentioned in pub.dev page that lib uses AndroidPdfViewer and there you can find information which says: "Library is available in jcenter repository, probably it'll be in Maven Central soon.". To fix this problem just add

allprojects {
    repositories {
        google()
        mavenCentral()
        jcenter()  //add this 
    }
}

to your android/build.gradle file. Worked in my case.

devfalah avatar Apr 27 '22 10:04 devfalah

just adding jcenter() worked for me

mumairofficial avatar May 04 '22 17:05 mumairofficial