I can not connect the guava library in Android Studio.Listing build.gradle:
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath'com.android.tools.build:gradle Survion.8.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
    dependencies {
        compile group:'com.google.guava', name:'guava', version:'15 .0'
    }
}

To which I get the error
A problem occurred evaluating root project'Test'.
>No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is used for argument types(java.util.LinkedHashMap) values:[[group: , name: guava, version: 15.0]]
Possible solutions: module(java.lang.Object)

How to connect this library correctly? I tried many ways from Google...

2 Answers 2

I don’t know if this is the right way, but it turned out this way: downloaded the .jar file from here search.maven.org/#artifactdetails%7Ccom.google.gua... then put it in the libs folder, then right-click on this .jar and add library
This is completely removed
dependencies {
        compile group:'com.google.guava', name:'guava', version:'15 .0'
    }