AndroidPdfViewer icon indicating copy to clipboard operation
AndroidPdfViewer copied to clipboard

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

Open karansubedi opened this issue 3 years ago • 39 comments

karansubedi avatar Feb 13 '22 19:02 karansubedi

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

ibrajix avatar Feb 15 '22 02:02 ibrajix

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

karansubedi avatar Feb 16 '22 04:02 karansubedi

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

arongeorgel avatar Feb 17 '22 18:02 arongeorgel

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

karansubedi avatar Feb 21 '22 06:02 karansubedi

Same problem here

Flashby2 avatar Feb 26 '22 15:02 Flashby2

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

sebasdeweert avatar Feb 27 '22 19:02 sebasdeweert

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

karansubedi avatar Mar 04 '22 15:03 karansubedi

try to use gradlePluginPortal()

morder avatar Mar 08 '22 13:03 morder

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

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

mg7237 avatar Mar 09 '22 08:03 mg7237

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

Astroa7m avatar Mar 10 '22 17:03 Astroa7m

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

karansubedi avatar Mar 11 '22 03:03 karansubedi

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

mg7237 avatar Mar 11 '22 05:03 mg7237

Solution

prince02765 avatar Mar 27 '22 16:03 prince02765

For android studio bumblebee or android studio arctic fox

add gradlePluginPortal() into settings.gradle file

mohmojahed avatar Jul 07 '22 10:07 mohmojahed

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

lividavi19 avatar Jul 11 '22 00:07 lividavi19

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 avatar Jul 31 '22 23:07 Aburafik

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

Aburafik avatar Jul 31 '22 23:07 Aburafik

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

zatovagul avatar Nov 09 '22 11:11 zatovagul

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.

Ahtisham186 avatar Dec 28 '22 00:12 Ahtisham186

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

SpaceIT2021 avatar Feb 07 '23 18:02 SpaceIT2021

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

yasirlashari avatar Apr 03 '23 11:04 yasirlashari

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

tonsnoei avatar Apr 07 '23 12:04 tonsnoei

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

krystek10071 avatar May 03 '23 17:05 krystek10071

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

bodysculptor256 avatar May 21 '23 18:05 bodysculptor256

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

Shashanksaxena777 avatar Aug 10 '23 09:08 Shashanksaxena777

Yeah, this works thanks for the help

ArbishAliMohbani avatar Sep 04 '23 13:09 ArbishAliMohbani

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" }
    }
}

Dror-Bar avatar Oct 18 '23 13:10 Dror-Bar

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

this solution is works for me 100%. Thanks

iGill01 avatar Dec 19 '23 20:12 iGill01

android.enableJetifier=true

perfectly work in 2024 too

ai-developer63 avatar Feb 09 '24 10:02 ai-developer63

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

itshaithamn avatar May 15 '24 09:05 itshaithamn