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 Baig
  • 576
  • 1
  • 6
  • 16

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
  • 73,189
  • 14
  • 161
  • 193
0

try to compile with previous dependency version like

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

clean project and rebuild.

Omkar
  • 2,810
  • 1
  • 21
  • 38