DImuthuUpe / AndroidPdfViewer

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

Received status code 401 from server: Unauthorized #1037

Open ghost opened 2 years ago

ghost commented 2 years ago

Good morning, I have two projects in android studio.

  1. One with version of kotlin ext.kotlin_version = '1.3.61' when compiling the project in android studio, I get the following:

Could not HEAD 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/2.8.2/android-pdf-viewer-2.8.2.pom'. Received status code 401 from server: Unauthorized Disable Gradle 'offline mode' and sync project

image

  1. Another with version de kotlin ext.kotlin_version = "1.5.0", al compilar el proyecto en android studio me sale otro error: image

I do not know what I am doing wrong or what is happening, I am writing here requesting your help, please, very kind, thank you very much.

Mrxxy commented 2 years ago

You are using gradle offline mode,so that dependencies cannot download,please off the offline mode in gradle setting; The second qusetion beacuse you use Androidx in your project,follow the guide to fix it.

Solid-Metal commented 2 years ago

You are using gradle offline mode,so that dependencies cannot download,please off the offline mode in gradle setting; The second qusetion beacuse you use Androidx in your project,follow the guide to fix it.

same problem with me, and the gradle is not on offline mode

`Could not resolve com.github.barteksc:android-pdf-viewer:2.8.2. Required by: project :app > project :react-native-view-pdf

Could not resolve com.github.barteksc:android-pdf-viewer:2.8.2. Could not get resource 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/2.8.2/android-pdf-viewer-2.8.2.pom'. Could not GET 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/2.8.2/android-pdf-viewer-2.8.2.pom'. Received status code 401 from server: Unauthorized`

harshalijain commented 2 years ago

Facing same issue, release blocked, unable to create build, please help.

Solid-Metal commented 2 years ago

i think JCenter and Jitpack is become more unstable, since it will be shutdown in february 2022, hope author will move it to MavenCentral soon

pissumos commented 2 years ago

Hi, I found the link below and guess they changed the name. I solved it by changing the dependency as follows: implementation 'com.github.barteksc:AndroidPdfViewer:2.8.0'

https://jitpack.io/p/barteksc/AndroidPdfViewer

Thomas-Bagnolati commented 2 years ago

Only the version 2.3.0 is working in my case:

implementation 'com.github.barteksc:AndroidPdfViewer:2.3.0'

AhmerAfzal1 commented 2 years ago

Try this kotlin version implementation 'io.github.ahmerafzal1:ahmer-pdfium:1.7.0' And implementation 'io.github.ahmerafzal1:ahmer-pdfviewer:1.6.0' Maybe helps you

dennisrufigill commented 2 years ago

Hi, I found the link below and guess they changed the name. I solved it by changing the dependency as follows: implementation 'com.github.barteksc:AndroidPdfViewer:2.8.0'

https://jitpack.io/p/barteksc/AndroidPdfViewer

Thank you so much.

fatsolow88 commented 1 year ago

I resolved it by adding jcenter() to my repositories

allprojects { repositories { mavenCentral() google() jcenter() } }

You may need to do so in your buildscript if you are using it as well

Using version com.github.barteksc:android-pdf-viewer:3.2.0-beta.1 right now

LabedAJalil commented 1 year ago

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

vimalcvs commented 1 year ago

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

    jcenter()  //  imp
}

}

mgithubmessier commented 1 year ago

I tried adding jcenter back in as well, but that ended up causing a different problem for me. Also, in my case I was doing a react-native migration, and their docs say to remove jcenter from the build process https://react-native-community.github.io/upgrade-helper/?from=0.64.2&to=0.65.3#RnDiffApp-android-build.gradle

vikas11 commented 11 months ago

vimalcvs Working for me. Thanks