0

I get this error when I want to add a library to Android:

implementation 'com.squareup.picasso:picasso:2.71828'



 ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.squareup.picasso:picasso:2.71828.
    Show Details
    Affected Modules: app

I got this link but didn't get an answer: Unable to resolve dependency Android Studio 3.0

reza motahari
  • 21
  • 1
  • 7

1 Answers1

1

You need to add a section allprojects at the end of your main build.gradle that defines the repositories for the modules of your project: build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

hope this will help you.

Pranav MS
  • 2,235
  • 2
  • 23
  • 50