Open fullstact69 opened 1 year ago
JCenter seems to be down (maybe permanently). You need to get this dependency from another repository. Try jitpack.
I have the same issue on CI. We're using jitpack and it doesn't help. Any thoughts?
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..
Add the following code in the "settings.gradle" file
maven { url "https://jcenter.bintray.com"}
Now add this code in the "gradle.properties" file
android.enableJetifier=true Now rebuild the project after cleaning it. This may help resolving the issue.
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 }
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.")
}
}
}
}
}
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
After trying numerous solutions, this one finally worked for me. Link
(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()
}
}
}
(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!!!
(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() } } }
This is the answer. JCenter is deprecated. Do not try to use it.
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
as this is the same repo as original barteksc - just renamed, it could be nice to have 3.2.0-beta-1 tag, as currently there isn't one, but it used to be. This way some of us could at least stay in the "core repository" for the project and would not be forced to downgrade.
Android Studio Flamingo | 2022.2.1 Patch 2.
Anyone to resolve this?