How to suppress the Avoid SDK with SDK warning?

I use Google Play services in my Android application, so I have a dependency in my build.gradle .

 compile 'com.google.android.gms:play-services:10.2.1' 

But Android Studio warns about this: Avoid using bundled version of Google Play services SDK .

Android warning

What does this warning mean? How can I avoid this? I searched a lot without finding a lot of information.

+57
android android-studio google-play-services
Apr 14 '17 at 7:40
source share
2 answers

In versions of Google Play services up to 6.5, you had to collect the entire API package into your application. In some cases, it made it difficult to save the number of methods in your application (including front-end APIs, library methods, and native code) in accordance with the limit of 65,536. Starting from version 6.5 , you can selectively compile the Google Play services API into your application

inside compile com.google.android.gms:play-services:12.0.0 contains many dependencies .. see below .. Using game services can cause a problem with dex and a heavy application. Choose only what you want, it really depends on you :)

 Google Play services API Description in build.gradle Google+ com.google.android.gms:play-services-plus:12.0.0 Google Account Login com.google.android.gms:play-services-auth:12.0.0 Google Actions, Base Client Library com.google.android.gms:play-services-base:12.0.0 Google Address API com.google.android.gms:play-services-identity:12.0.0 Google Analytics com.google.android.gms:play-services-analytics:12.0.0 Google Awareness com.google.android.gms:play-services-awareness:12.0.0 Google Cast com.google.android.gms:play-services-cast:12.0.0 Google Cloud Messaging com.google.android.gms:play-services-gcm:12.0.0 Google Drive com.google.android.gms:play-services-drive:12.0.0 Google Fit com.google.android.gms:play-services-fitness:12.0.0 Google Location and Activity Recognition com.google.android.gms:play-services-location:12.0.0 Google Maps com.google.android.gms:play-services-maps:12.0.0 Google Mobile Ads com.google.android.gms:play-services-ads:12.0.0 Google Places com.google.android.gms:play-services-places:12.0.0 Mobile Vision com.google.android.gms:play-services-vision:12.0.0 Google Nearby com.google.android.gms:play-services-nearby:12.0.0 Google Panorama Viewer com.google.android.gms:play-services-panorama:12.0.0 Google Play Game com.google.android.gms:play-services-games:12.0.0 SafetyNet com.google.android.gms:play-services-safetynet:12.0.0 Android Pay com.google.android.gms:play-services-wallet:12.0.0 Android Wear com.google.android.gms:play-services-wearable:12.0.0 

Firebase

 Firebase API Description in build.gradle Analytics com.google.firebase:firebase-core:12.0.0 Realtime Database com.google.firebase:firebase-database:12.0.0 Cloud Firestore com.google.firebase:firebase-firestore:12.0.0 Storage com.google.firebase:firebase-storage:12.0.0 Crash Reporting com.google.firebase:firebase-crash:12.0.0 Authentication com.google.firebase:firebase-auth:12.0.0 Cloud Messaging com.google.firebase:firebase-messaging:12.0.0 Remote Config com.google.firebase:firebase-config:12.0.0 Invites and Dynamic Links com.google.firebase:firebase-invites:12.0.0 AdMob com.google.firebase:firebase-ads:12.0.0 App Indexing com.google.firebase:firebase-appindexing:12.0.0 Performance Monitoring com.google.firebase:firebase-perf:12.0.0 

EDIT The above version is already outdated. They use individual version control. See link below

Google Play Service - https://developers.google.com/android/guides/setup
Firebase - https://firebase.google.com/docs/android/setup

+121
Apr 14 '17 at 7:48
source share
— -

Google services contain many separate APIs. You can access what you need, rather than access a package containing all of them. This is a better fit. See Table No. 1 Here

+9
Apr 14 '17 at 7:46 on
source share



All Articles