binSaed / flutter_cached_pdfview

Enhanced PDF view for Flutter.
https://pub.dev/packages/flutter_cached_pdfview
MIT License
117 stars 67 forks source link

bug #80

Open OsamaNasserDev opened 2 years ago

OsamaNasserDev commented 2 years ago

FAILURE: Build failed with an exception.

mumairofficial commented 2 years ago

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

image
devfalah commented 2 years ago

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.

mumairofficial commented 2 years ago

just adding jcenter() worked for me