AndroidPdfViewer icon indicating copy to clipboard operation
AndroidPdfViewer copied to clipboard

Received status code 401 from server: Unauthorized

Open ghost opened this issue 3 years ago • 17 comments

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.

ghost avatar Sep 08 '21 15:09 ghost

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.

Mrxxy avatar Sep 15 '21 08:09 Mrxxy

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

SolidTears avatar Sep 16 '21 03:09 SolidTears

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

harshalijain avatar Sep 17 '21 02:09 harshalijain

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

SolidTears avatar Sep 17 '21 06:09 SolidTears

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

pissumos avatar Oct 15 '21 13:10 pissumos

Only the version 2.3.0 is working in my case:

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

Thomas-Bagnolati avatar Mar 10 '22 14:03 Thomas-Bagnolati

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

AhmerAfzal1 avatar Mar 10 '22 15:03 AhmerAfzal1

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.

dennisrufigill avatar May 13 '22 05:05 dennisrufigill

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

fatsolow88 avatar Aug 17 '22 04:08 fatsolow88

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

LabedAJalil avatar Nov 13 '22 22:11 LabedAJalil

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

    jcenter()  //  imp
}

}

vimalcvs avatar May 03 '23 09:05 vimalcvs

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

mgithubmessier avatar Jun 05 '23 14:06 mgithubmessier

vimalcvs Working for me. Thanks

vikas11 avatar Jul 28 '23 18:07 vikas11