AndroidPdfViewer icon indicating copy to clipboard operation
AndroidPdfViewer copied to clipboard

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

Open fullstact69 opened this issue 2 years ago • 20 comments

Android Studio Flamingo | 2022.2.1 Patch 2.

Anyone to resolve this?

fullstact69 avatar Jun 23 '23 07:06 fullstact69

JCenter seems to be down (maybe permanently). You need to get this dependency from another repository. Try jitpack.

afaneca avatar Jun 23 '23 07:06 afaneca

I have the same issue on CI. We're using jitpack and it doesn't help. Any thoughts? image

mhnowak avatar Jun 23 '23 07:06 mhnowak

Seems to be related with this issue.

afaneca avatar Jun 23 '23 08:06 afaneca

Seems like some tags are not present: https://github.com/barteksc/AndroidPdfViewer/tags

I have a dependency on a library that uses com.github.barteksc:android-pdf-viewer:2.8.2 Can't see 2.8.2 tag though..

ron-brosh avatar Jun 23 '23 11:06 ron-brosh

Add the following code in the "settings.gradle" file

maven { url "https://jcenter.bintray.com"} image

Now add this code in the "gradle.properties" file

android.enableJetifier=true image Now rebuild the project after cleaning it. This may help resolving the issue.

Harsh5488 avatar Aug 10 '23 15:08 Harsh5488

Add this line at two place in build.gradle maven { url "https://jcenter.bintray.com"}/

example,

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { // ext.kotlin_version = '1.7.1' repositories { google() mavenCentral() maven { url "https://jcenter.bintray.com"}/ } dependencies { classpath 'com.android.tools.build:gradle:8.1.2' classpath 'com.google.gms:google-services:4.4.0' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'

// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

// def nav_version = '2.7.6' classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.6"

} }

allprojects { repositories { google() mavenCentral() maven { url "https://jcenter.bintray.com"}/

maven { url "https://jitpack.io" } //zooming photoView

} }

tasks.register('clean', Delete) { delete rootProject.buildDir }

dhirunand avatar Jan 27 '24 12:01 dhirunand

I use next solution.

Add it to your project level build.gradle.kts.

allprojects {
    configurations {
        all {
            resolutionStrategy {
                dependencySubstitution {
                    substitute(module("com.github.barteksc:android-pdf-viewer"))
                        .using(module("com.github.DImuthuUpe:AndroidPdfViewer:3.2.0-beta.1"))
                        .because("Library is in a process of ownership transfer. Jitpack and Jcenter are not reliable.")
                }
            }
        }
    }
}

sikrinick avatar Aug 20 '24 07:08 sikrinick

Heres a solution in 2024, worked for me in your build.gradle.kts

implementation("com.github.mhiew:android-pdf-viewer:3.2.0-beta.1") ,

and in your settings.gradle.kts :

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven(url = "https://jitpack.io") // Notice the syntax for url jcenter() // Deprecated, consider removing or replacing if possible } }.

GoodLuck bandicam 2024-08-22 12-36-17-951 bandicam 2024-08-22 12-35-58-111

3l500nfy avatar Aug 22 '24 11:08 3l500nfy

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

Nayan014 avatar Aug 23 '24 12:08 Nayan014

(Aug 2024) Add these two in your Project level build.gradle

 buildscript {
  ext {
    .
    ..
    pdfViewerVersion = '3.2.0-beta.3'
    pdfViewerRepo = 'com.github.mhiew'
  }

and in settings.gradle

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

RaghavStepron avatar Aug 28 '24 05:08 RaghavStepron

(Aug 2024) Add these two in your Project level build.gradle

 buildscript {
  ext {
    .
    ..
    pdfViewerVersion = '3.2.0-beta.3'
    pdfViewerRepo = 'com.github.mhiew'
  }

and in settings.gradle

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

thank you!!!

omandotkom avatar Sep 03 '24 07:09 omandotkom