Zappy.Mans
Zappy.Mans

Reputation: 672

Android Studio - Too many libraries imported to project eventhough they are not compiled in dependencies

I am creating a new Android application that using Firebase. I followed goolge guide to add Firebase SDK to my project. below are my project 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()
    }
}

And application build.gradle ....

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'

I checked in External library of my project. There are too many library that I don't not need such as: play-service-location-9.0.2, play-service-maps-9.0.2, play-service--nearby-9.0.2... enter image description here

Could you explain and help me reduce unused library that I don't added into my project ?

Upvotes: 1

Views: 563

Answers (1)

Ali Bdeir
Ali Bdeir

Reputation: 4375

Try removing the dependencies you don't need by deleting the dependency from the build.gradle one by one, if you get an error after removing one of your dependencies, add the dependency you just removed back.

As long as you get no errors or problems when removing the dependencies you don't need, everything will be fine.

Upvotes: 2

Related Questions