Open karansubedi opened 2 years ago
Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.2 After adding jcenter to setting.gradle
Try and go with the latest version - com.github.barteksc:android-pdf-viewer:3.2.0-beta.1
Failed to resolve: com.github.barteksc:android-pdf-viewer:3.2.0-beta.1 same problemo
Same problem here
Try using com.github.mhiew:android-pdf-viewer:3.2.0-beta.1
Whatever version you are using please try updating settings.gradle file with jcenter and mavencentral this might solve your problem if you are using bumblebee android studio Correct me If I am wrong :)
try to use gradlePluginPortal()
Has someone found a solution that works? I am still struggling with this.
Worse case, I will have to move to another plugin.
add jcenter() in repositories blocks under pluginManagement and dependencyResolutionManagement blocks in settings.gradle for android Bumblebee
Astroa7m is correct just do that as he said the problem has been already solved by doing so...
I had to bump up the minSDK to 31 to get it to work.
For android studio bumblebee or android studio arctic fox
add gradlePluginPortal() into settings.gradle file
WORKED FOR ME
1) replace jCenter() with mavenCentral() 2) Then do: implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.1'
** I am on Arctic Fox 2020.3.1 Patch 1
Adding jCenter() to the your build.gradle in the android folder below will work for you. I was having similar challenge but after adding it , everything is now working fine for me allprojects { repositories { google() mavenCentral() jcenter()
}
}
How to resolve Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. in Flutter application
@Aburafik Do you have problem with showing Pdf only on Release?
Here is the solution. In setting.gradle >dependencyResolutionManagement add this line maven {url "https://jcenter.bintray.com"} In gradle.properties Add this line android.enableJetifier=true that's all, after adding these two lines in your project will resolve the error.
Here is the solution. In setting.gradle >dependencyResolutionManagement add this line maven {url "https://jcenter.bintray.com"} In gradle.properties Add this line android.enableJetifier=true that's all, after adding these two lines in your project will resolve the error.
It worked, thanks
Guys hope you are doing well . Actually I am working on android studio but I face such issue so please help me
I finally fixed it thanks to all comments above. Just to summarize it for others. The fix for React Native 0.71.6 you have to add the following lines in the android/build.gradle
pdfViewerVersion = "3.2.0-beta.1"
pdfViewerRepo = "com.github.mhiew"
jcenter()
...
ext {
...
pdfViewerVersion = "3.2.0-beta.1"
pdfViewerRepo = "com.github.mhiew"
}
repositories {
...
jcenter()
}
Here is the solution. In setting.gradle >dependencyResolutionManagement add this line maven {url "https://jcenter.bintray.com"} In gradle.properties Add this line android.enableJetifier=true that's all, after adding these two lines in your project will resolve the error.
is worked for me
Astroa7m is right. to those correcting the problem be careful to avoid adding jcenter() in plugin management because your app wont run so look out for the dependencyResolutionManagement and ADD it to the repository block there
solution : for latest version of android studio(flamingo or giraffe)--->
Add 'android.enableJetifier=true' in gradle.properties, Then go to settings.gradle.kts and you to add gradlePluginPortal() as shown below;
pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() <----Leave this as it is } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() gradlePluginPortal() <----- this line you have to add in dependencyResolutionManagement } }
Hope this resolves your problem. I also got confused but found the solution........
Yeah, this works thanks for the help
There are a couple of solutions in this thread that I believe work, but for me I didn't need to edit settings.gradle
at all, only android/build.gradle
and this is what I needed to add:
allprojects {
repositories {
maven { url "https://jcenter.bintray.com" }
}
}
2. implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.1'
this solution is works for me 100%. Thanks
android.enableJetifier=true
perfectly work in 2024 too
com.github.barteksc:android-pdf-viewer:3.2.0-beta.1
do com.github.barteksc:pdfium-android if you do not want to use jcenter, because for some reason jcenter didnt work for me and I spent an hour to find out that android-pdf-viewer doesnt exist here: https://repo.maven.apache.org/maven2/, which is what I was using for some reason. Computers are confusing
just add two lines in ext in android/build.gradlew
buildscript { ext { ...
Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.2 After adding jcenter to setting.gradle
This Solution Works in August 2024.ive tried many solutions beforeit, but it didnt work.. Check how i insert inmy Gardle
(Aug 2024) Add these two in your Project level build.gradle
buildscript {
ext {
.
..
pdfViewerVersion = '3.2.0-beta.3'
pdfViewerRepo = 'com.github.mhiew'
}
and in settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
.
..
mavenCentral()
}
}
}
Here is the solution
Step - 1: Add it in your root build.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Step - 2: Add the dependency
implementation 'com.github.barteksc:AndroidPdfViewer:2.3.0'
Try using
com.github.mhiew:android-pdf-viewer:3.2.0-beta.1
Thabk you this worked for me
I finally fixed it thanks to all comments above. Just to summarize it for others. The fix for React Native 0.71.6 you have to add the following lines in the
android/build.gradle
- ext >
pdfViewerVersion = "3.2.0-beta.1"
- ext >
pdfViewerRepo = "com.github.mhiew"
- repositories >
jcenter()
... ext { ... pdfViewerVersion = "3.2.0-beta.1" pdfViewerRepo = "com.github.mhiew" } repositories { ... jcenter() }
this working
2024 solution
2024 solution
1. Make sure to add -> maven { url 'https://jitpack.io' } 2. Add: api 'com.github.barteksc:AndroidPdfViewerV1:1.6.0'
Thank you 😊💖
Add jcenter() to you build.gradle file or settings.gradle (for bumblebee)