[SOLVED] Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.1

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under
CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.


I am trying use this library in my Project. But i am unable to download it by adding it in gradle build. In fact i am even unable to download any library through gradle. I need to manually download a jar file and add that as a library. But in this case I couldn’t find the jar file for PDFviewer.

Build.gradle (Module)

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:23.0.1'
testCompile 'junit:junit:4.12'
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/log4j-1.2.9.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/json-simple-1.1.jar')
compile files('libs/glide-3.7.0.jar')
compile files('libs/commons-codec-1.9.jar')
compile files('libs/asmack.jar')
compile files('libs/android-logging-log4j-1.0.3.jar')
compile 'com.github.barteksc:android-pdf-viewer:2.8.1'  //unable to add this.


allprojects {
repositories {
    maven {
        url "https://maven.google.com"
   // google()  
   // mavenLocal() // tried everything

I have tried almost everything for the past three days given in SO but still couldn’t find any solution to this. It will be helpful even if i get the jar file.


You should add

      maven { url "http://jcenter.bintray.com" }

Answered By – IntelliJ Amiya

people found this article helpful. What about you?