Android Studio导入错误:“无法解析符号'collect'”(com.google.android.collect.Lists)

时间:2016-10-01 21:47:12

标签: android android-studio android-gradle guava

这是我的build.gradle文件的样子

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })



    compile group: 'com.google.guava', name: 'guava', version: '18.0'
    compile 'com.google.android.gms:play-services:9.6.1'

    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    testCompile 'junit:junit:4.12'
}

任何人都可以找出为什么它不会导入com.google.android.collect.Lists?

1 个答案:

答案 0 :(得分:0)

Guava没有名为com.google.android.collect.Lists的类。 The class is com.google.common.collect.Lists