DImuthuUpe / AndroidPdfViewer

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

Solution of "Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.2" #1076

Open prince02765 opened 2 years ago

prince02765 commented 2 years ago

Simply add this line into the build.gradle(app level)

implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'


If you have android studio bumblebee or android studio arctic fox then,

add gradlePluginPortal() into settings.gradle file

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() gradlePluginPortal() } }

adityapalange commented 2 years ago

thanks ... I was getting error when adding <com.github.barteksc.pdfviewer.PDFView android:id="@+id/pdfView" android:layout_width="match_parent" android:layout_height="match_parent"/> to layout..... = Class referenced in the layout file, com.github.barteksc.pdfviewer.PDFView, was not found in the project or the libraries

and then I added gradlePluginPortal() ..... like you said.... and error is gone

krishu-rdx commented 2 years ago

Thanks!! It worked...

adarsh-dhakad commented 2 years ago

its not working giving me this error Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.8.0-runtime (androidx.core:core:1.8.0) and support-compat-25.3.1-runtime (com.android.support:support-compat:25.3.1)

anupsamanta commented 2 years ago

thanks ... I was getting error when adding to layout..... = Class referenced in the layout file, com.github.barteksc.pdfviewer.PDFView, was not found in the project or the libraries

and then I added gradlePluginPortal() ..... like you said.... and error is gone

Thanks. It worked.

sajiiidali commented 1 year ago

i have added gradlePluginPortal()...... but the problem is same Cannot resolve class com.github.barteksc.pdfviewer.PDFView

adarsh-dhakad commented 1 year ago

use thisimplementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.3'

sakshiselmokar commented 1 year ago

thank you i had same issue

adarsh-dhakad commented 1 year ago

hello i got the solution use this dependency

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

adarsh-dhakad commented 1 year ago

thank you i had same issue

use this one, this is available for mavenCentral

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

usman332 commented 1 month ago

No solution is working , is there any other way ? I have to run the old project

Sherali-cloud commented 1 month ago

implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.3' thnks this is work in my pc tnks you so much. 😊👌✔