Closed rushikeshnarwade closed 2 years ago
Same problem here
same problem
Describe the bug When I am trying to run my app on any device it's showing the following error `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`
This problem solves This problem solves when I add jCenter() in build.gradle in android folder But I don't understand why this error occures at all
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.
Yes this problem solves after adding jcenter(). Thank you @devfalah for your explanation.
Describe the bug When I am trying to run my app on any device it's showing the following error `Execution failed for task ':app:checkDebugAarMetadata'.
This problem solves This problem solves after adding
jcenter()
in allprojects->repositories in build.gradle in android folder But I don't understand why this error occures at all