rumax / react-native-PDFView

📚 PDF viewer for React Native
MIT License
300 stars 92 forks source link

Received status code 401 from server: Unauthorized #226

Closed rakmobility closed 2 years ago

rakmobility commented 2 years ago

Building for Android and getting: Required by: project :app > project :react-native-view-pdf

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

"react-native-view-pdf": "0.13.2",

Using below repos: repositories { mavenLocal() mavenCentral() google() maven { url 'https://maven.google.com' } maven { url("https://jitpack.io") } maven { url "https://maven.fabric.io/public" } }

ConorLindsay94 commented 2 years ago

Exact same issue here - using latest version

ConorLindsay94 commented 2 years ago

According to https://github.com/rumax/react-native-PDFView/issues/204 - This is due to not including jcenter() in the build.gradle file. Will this not be an issue with jcenter shutting down?

calintamas commented 2 years ago

Indeed, adding jcenter() to android/build.gradle fixes the issue. They say that jcenter is in readonly mode indefinitely, so I suppose it should be fine for now.

// android/build.gradle

allprojects {
    repositories {
        ...
        jcenter()
    }
}
JoseMurilloc commented 2 years ago

According to #204 - This is due to not including jcenter() in the build.gradle file. Will this not be an issue with jcenter shutting down?

I'm removing jcenter, any update on this solution?

rumax commented 2 years ago

any update on this solution?

Did you try an alternative solution mentioned in readme?

Barteksc PdfViewer uses JCenter, which should be read-only indefinitely, but in case the host project does not use it, there is a possibility to use mhiew/AndroidPdfViewer which is a fork published on mavenCentral.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Nayan014 commented 3 months ago

After trying numerous solutions, this one finally worked for me. Link