skip to Main Content

I have tried these two libraries in order to make Image Zoomable, but I’m facing the same problem.
This is the error message

Failed to resolve: com.github.MikeOrtiz:TouchImageView:1.4.1
Show in Project Structure dialog
Affected Modules: app

At first, I thought it’s maybe because of Jetpack Compose with Java, Because I tried to use TouchImageView Library as I’ve mentioned here,

implementation ‘com.github.MikeOrtiz:TouchImageView:1.4.1’

for this Library, it was needed to import

maven { url ‘https://jitpack.io’ }

I did import it to build.gradle project, also there was no allproject in that file, then I tried to import it into settings.gradle as well. in short, I just faced the same error message image is shown below

Gradle Warning/error message image

2

Answers


  1. Go to settings.gradle

    Add this line at bottom: include ':app',':touchview'

    Add maven { url 'https://jitpack.io' } to

    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories           
    
    Login or Signup to reply.
  2. Meanwhile, I had the same problem. I have also performed the suggested steps below.

    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    

    File -> Invalidate Caches/Restart and so so… I solved this problem by following the steps below:

    1. Open your android project.
    2. Open the gradle.properties under the Gradle Scripts
    3. Add this code
      android.enableJetifier=true
    4. Add the following code build.gradle(Module:app)
      implementation 'com.github.chaosleung:pinview:1.3.1'

    After these steps, the problem was solved and I didn’t need to add the steps like maven mentioned above.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search