Android studio Android Studio-导入到project Event的库太多,尽管它们不是在依赖项中编译的

Android studio Android Studio-导入到project Event的库太多,尽管它们不是在依赖项中编译的,android-studio,gradle,firebase,Android Studio,Gradle,Firebase,我正在使用Firebase创建一个新的Android应用程序。我按照goolge指南将Firebase SDK添加到我的项目中。 以下是我的gradle项目: buildscript { repositories { jcenter(){ url "http://jcenter.bintray.com/" } mavenCentral() } dependencies { classp

我正在使用Firebase创建一个新的Android应用程序。我按照goolge指南将Firebase SDK添加到我的项目中。 以下是我的gradle项目:

buildscript {
    repositories {
        jcenter(){
            url "http://jcenter.bintray.com/"
        }
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
和应用程序build.gradle

我签入了项目的外部库。我不需要的库太多了,比如:play-service-location-9.0.2,play-service-maps-9.0.2,play-service-neared-9.0.2。。。


您能解释一下并帮助我减少我没有添加到项目中的未使用库吗?

尝试通过从生成中逐个删除依赖项来删除不需要的依赖项。gradle,如果删除依赖项后出现错误,请重新添加刚删除的依赖项


只要删除不需要的依赖项时没有错误或问题,一切都会好起来。

我删除了“compile'com.google.android.gms:play services:9.0.2”。一些未使用的库已被删除。我是否解决了您的问题?我不明白你最后的评论。是的。是的。我删除了build.gradle中的compile'com.google.android.gms:play services:9.0.2'。删除了一些未使用的库,如play-service-location-9.0.2、play-service-maps-9.0.2、play-service-neared-9.0.2。谢谢。@Zappy.Mans既然我解决了你的问题,记得选择我的答案作为解决你问题的答案。这将帮助未来的访客解决您的问题。我是新会员。你能指导我做这件事吗。
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    /* For Google Play Services */
    //Firebase
    //addd firebase notification - messaging.
    //add firbaes dynamic link:
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.google.android.gms:play-services-safetynet:9.0.2'
    compile 'com.google.android.gms:play-services-auth:9.0.2'
    compile 'com.firebaseui:firebase-ui:0.2.2'
    compile 'com.google.firebase:firebase-messaging:9.0.2'
    compile 'com.google.firebase:firebase-invites:9.0.2'
    compile 'com.google.android.gms:play-services:9.0.2'
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'