8

I am using the google play ads dependency just to get the advertising id.

com.google.android.gms:play-services-ads:7.8.0

Is there any way to avoid this as the library has a method count of 6201.

rahul.ramanujam
  • 5,608
  • 7
  • 34
  • 56
  • Not all of GPS is proguaded. Click on "external" libs from the left hand side and you can see which module that `AdvertisingId` will be in. – Jared Burrows Dec 25 '15 at 01:34

1 Answers1

11

AdvertisingIdClient and its associated classes are also found in the much smaller

com.google.android.gms:play-services-basement:8.3.0

if you use Google Play services 8.3. Prior to that point, you are correct in that it was part of play-services-ads.

In any case, it is strongly recommended that you use ProGuard to remove unused code from your app before shipping retail versions of your app.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443