DImuthuUpe / AndroidPdfViewer

Android view for displaying PDFs rendered with PdfiumAndroid
Apache License 2.0
8.18k stars 1.91k forks source link

could not find com.github.barteksc:android-pdf-viewer:2.8.2. #1067

Open karansubedi opened 2 years ago

ibrajix commented 2 years ago

Add jcenter() to you build.gradle file or settings.gradle (for bumblebee)

karansubedi commented 2 years ago

Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.2 After adding jcenter to setting.gradle

arongeorgel commented 2 years ago

Try and go with the latest version - com.github.barteksc:android-pdf-viewer:3.2.0-beta.1

karansubedi commented 2 years ago

Failed to resolve: com.github.barteksc:android-pdf-viewer:3.2.0-beta.1 same problemo

Flashby2 commented 2 years ago

Same problem here

sebasdeweert commented 2 years ago

Try using com.github.mhiew:android-pdf-viewer:3.2.0-beta.1

karansubedi commented 2 years ago

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 :)

morder commented 2 years ago

try to use gradlePluginPortal()

mg7237 commented 2 years ago

Has someone found a solution that works? I am still struggling with this.

Worse case, I will have to move to another plugin.

Astroa7m commented 2 years ago

add jcenter() in repositories blocks under pluginManagement and dependencyResolutionManagement blocks in settings.gradle for android Bumblebee

karansubedi commented 2 years ago

Astroa7m is correct just do that as he said the problem has been already solved by doing so...

mg7237 commented 2 years ago

I had to bump up the minSDK to 31 to get it to work.

prince02765 commented 2 years ago

Solution

mohmojahed commented 2 years ago

For android studio bumblebee or android studio arctic fox

add gradlePluginPortal() into settings.gradle file

lividavi19 commented 2 years ago

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

Aburafik commented 2 years ago

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()

}

}

Aburafik commented 2 years ago

How to resolve Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. in Flutter application

zatovagul commented 2 years ago

@Aburafik Do you have problem with showing Pdf only on Release?

Ahtisham186 commented 1 year ago

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.

SpaceIT2021 commented 1 year ago

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

yasirlashari commented 1 year ago

needd Guys hope you are doing well . Actually I am working on android studio but I face such issue so please help me

tonsnoei commented 1 year ago

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"
   pdfViewerRepo = "com.github.mhiew"
}
repositories {
   ...
   jcenter()
}
krystek10071 commented 1 year ago

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

bodysculptor256 commented 1 year ago

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

Shashanksaxena777 commented 1 year ago

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........

ArbishAliMohbani commented 1 year ago

Yeah, this works thanks for the help

Dror-Bar commented 1 year ago

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" }
    }
}
iGill01 commented 11 months ago

2. implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.1'

this solution is works for me 100%. Thanks

ai-developer63 commented 9 months ago

android.enableJetifier=true

perfectly work in 2024 too

itshaithamn commented 6 months ago

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

sagarsq commented 5 months ago

just add two lines in ext in android/build.gradlew

buildscript { ext { ...

3l500nfy commented 3 months ago

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 bandicam 2024-08-22 12-35-58-111 bandicam 2024-08-22 12-36-17-951

RaghavStepron commented 2 months ago

(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()
    }
  }
}
tawhidmonowar commented 2 months ago

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'

ShaheenMakandar commented 2 months ago

Try using com.github.mhiew:android-pdf-viewer:3.2.0-beta.1

Thabk you this worked for me

Rahmathidayat4299 commented 1 month ago

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

wanderfilho commented 1 month ago

2024 solution

  1. Make sure to add -> maven { url 'https://jitpack.io' }
  2. Add: api 'com.github.barteksc:AndroidPdfViewerV1:1.6.0'
SephirothLT commented 1 month ago

solved : https://github.com/DImuthuUpe/AndroidPdfViewer/issues/1206#issuecomment-2311750611

mehedihasansrijon commented 1 month ago

2024 solution

1. Make sure to add -> maven { url 'https://jitpack.io' }

2. Add: api 'com.github.barteksc:AndroidPdfViewerV1:1.6.0'

Thank you 😊💖