在谷歌之前的6.5 Play服务的版本,你必须的API的整个包编译到您的应用程序。在某些情况下,这样做会使得应用程序中的方法数量(包括框架API,库方法和自己的代码)在65,536的限制之下变得更加困难。 从6.5版,你可以选择,而不是谷歌编译使用游戏服务可能会导致DEX问题和重Play应用程式服务API为您的应用程序
内部编译com.google.android.gms:play-services:11.6.0
都包含依赖的很多..见下文..。只有选择哪个要你真的要看到:)
Google Play services API Description in build.gradle
Google+ com.google.android.gms:play-services-plus:11.6.0
Google Account Login com.google.android.gms:play-services-auth:11.6.0
Google Actions,
Base Client Library com.google.android.gms:play-services-base:11.6.0
Google Address API com.google.android.gms:play-services-identity:11.6.0
Google Analytics com.google.android.gms:play-services-analytics:11.6.0
Google Awareness com.google.android.gms:play-services-awareness:11.6.0
Google Cast com.google.android.gms:play-services-cast:11.6.0
Google Cloud Messaging com.google.android.gms:play-services-gcm:11.6.0
Google Drive com.google.android.gms:play-services-drive:11.6.0
Google Fit com.google.android.gms:play-services-fitness:11.6.0
Google Location and
Activity Recognition com.google.android.gms:play-services-location:11.6.0
Google Maps com.google.android.gms:play-services-maps:11.6.0
Google Mobile Ads com.google.android.gms:play-services-ads:11.6.0
Google Places com.google.android.gms:play-services-places:11.6.0
Mobile Vision com.google.android.gms:play-services-vision:11.6.0
Google Nearby com.google.android.gms:play-services-nearby:11.6.0
Google Panorama Viewer com.google.android.gms:play-services-panorama:11.6.0
Google Play Game com.google.android.gms:play-services-games:11.6.0
SafetyNet com.google.android.gms:play-services-safetynet:11.6.0
Android Pay com.google.android.gms:play-services-wallet:11.6.0
Android Wear com.google.android.gms:play-services-wearable:11.6.0
火力地堡
Firebase API Description in build.gradle
Analytics com.google.firebase:firebase-core:11.6.2
Realtime Database com.google.firebase:firebase-database:11.6.2
Cloud Firestore com.google.firebase:firebase-firestore:11.6.2
Storage com.google.firebase:firebase-storage:11.6.2
Crash Reporting com.google.firebase:firebase-crash:11.6.2
Authentication com.google.firebase:firebase-auth:11.6.2
Cloud Messaging com.google.firebase:firebase-messaging:11.6.2
Remote Config com.google.firebase:firebase-config:11.6.2
Invites and
Dynamic Links com.google.firebase:firebase-invites:11.6.2
AdMob com.google.firebase:firebase-ads:11.6.2
App Indexing com.google.firebase:firebase-appindexing:11.6.2
Performance Monitoring com.google.firebase:firebase-perf:11.6.2
这是因为播放服务具有很多包含在它里面的依赖..看看这里.. https://开头开发商。 google.com/android/guides/setup ..选择您想要使用的任何依赖关系,而不是全部使用它们。 – ZeroOne
@ZeroOne酷。谢谢你快速的回复。你能否为这个问题添加一个答案,以便我能接受它? –
我没有意识到这一点。当我浏览一些教程时,并没有意识到运行Gradle时这是多么糟糕。我很高兴在项目早期发现这一点。 –