2

I want to use PhotoView for zooming in android https://github.com/chrisbanes/PhotoView but I'm getting the following error

dependencies {
    implementation 'com.github.chrisbanes:PhotoView:2.1.3 '//zoom
    implementation 'com.android.support:support-v4:26.0.2 '
}

root level build.gradle

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}
Mirza Asad
  • 606
  • 1
  • 7
  • 18

2 Answers2

9

Make sure, You added this in your root level build.gradle section.

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

After that, Clean-Rebuild-Run.

Demo

buildscript {

    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

try to compile with previous dependency version like

implementation 'com.github.chrisbanes:PhotoView:2.0.0'

clean project and rebuild.

Omkar
  • 3,040
  • 1
  • 22
  • 42