0

How can I use google plus sign in without my app reaching 65K methods?

Can I try with some earlier version of google play services? If yes, a link to guide for that would be awesome.

It feels really lame to include such a big library for just the google plus sign in.

Has anyone managed to use google play services 7.8 without reaching the dex limit?

Vedant Agarwala
  • 18,146
  • 4
  • 66
  • 89

1 Answers1

3

You can selectively include only the needed services.

From version 6.5, you can instead selectively compile Google Play service APIs into your app. For example, to include only the Google Fit and Android Wear APIs, replace the following line in your build.gradle file:

compile 'com.google.android.gms:play-services:7.8.0' with these lines:

compile 'com.google.android.gms:play-services-fitness:7.8.0' compile 'com.google.android.gms:play-services-wearable:7.8.0'

See the documentation about details and what to use for the various services.

Ridcully
  • 23,362
  • 7
  • 71
  • 86
  • Awesome answer, I didn't know you can do that! @vedant1811 but yes, you can also use older version of google play services - http://stackoverflow.com/a/26838281/1182260 – Vedran Kopanja Sep 22 '15 at 13:53
  • 1
    Do not use old versions of the play services. The new versions don't only provide new functions but also bug fixes and security fixes. – Ridcully Sep 22 '15 at 13:55