Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Build Error: Could not find com.github.chrisbanes:PhotoView:2.2.0. #62

Open
mcanyucel opened this issue Oct 12, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@mcanyucel
Copy link

I have tried to implement the simple example in the readme using Glide but I get this error:

Could not find com.github.chrisbanes:PhotoView:2.2.0.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/github/chrisbanes/PhotoView/2.2.0/PhotoView-2.2.0.pom
  - https://jcenter.bintray.com/com/github/chrisbanes/PhotoView/2.2.0/PhotoView-2.2.0.pom
Required by:
    project :app > com.github.stfalcon:stfalcon-imageviewer:1.0.1

Here is my project and app level build.gradle files:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext {
        kotlin_version = "1.4.10"
    }

    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
        classpath 'com.google.gms:google-services:4.3.3'

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
...
    // image display
    implementation 'com.github.stfalcon:stfalcon-imageviewer:1.0.1'
...

And the displaying code:

    private fun displayPhoto(imageUri: Uri) {
        StfalconImageViewer.Builder(context, listOf(imageUri)) { view, image ->
            GlideApp.with(requireContext()).load(image).into(view)
        }.show()
    }
@mcanyucel mcanyucel added the bug Something isn't working label Oct 12, 2020
@MoustafaElsaghier
Copy link

any luck with this?

@mcanyucel
Copy link
Author

any luck with this?

Sadly no, I had to use another library.

@MoustafaElsaghier
Copy link

can you please mention it to me?

@mcanyucel
Copy link
Author

can you please mention it to me?

I used the followings to display images in a zoomable control:

    // displaying photos
    implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    kapt 'com.github.bumptech.glide:compiler:4.11.0'

@MoustafaElsaghier
Copy link

i need to achieve the pop-up animation when clicking on the items any lib?

@mcanyucel
Copy link
Author

i need to achieve the pop-up animation when clicking on the items any lib?

sorry I have no idea.

@wangxinling
Copy link

wangxinling commented May 3, 2021

The buildscript and allprojects both need to be added maven setting.
This is worked for me.

buildscript {
    repositories {
        google()
        jcenter()
        maven { url "https://www.jitpack.io" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants