将所有Google支持库更新到最新版本(从v21到v22.2.0以及将Play服务更新到v7.5)后,我的项目不再成功构建。我得到的日志如下:
compass-rails
我已尝试将库恢复到早期版本,但仍会出现相同的错误。有没有人建议如何解决这个问题?
答案 0 :(得分:21)
Play服务是一个很大的库,有成千上万的方法会影响你的dex限制。更好地用您需要的部件替换播放服务导入。从6.5版开始,您可以选择性地将Google Play服务API编译到您的应用中。
Google+ com.google.android.gms:play-services-plus:7.5.0
Google Account Login com.google.android.gms:play-services-identity:7.5.0
Google Actions, Base Client Library com.google.android.gms:play-services-base:7.5.0
Google App Indexing com.google.android.gms:play-services-appindexing:7.5.0
Google App Invites com.google.android.gms:play-services-appinvite:7.5.0
Google Analytics com.google.android.gms:play-services-analytics:7.5.0
Google Cast com.google.android.gms:play-services-cast:7.5.0
Google Cloud Messaging com.google.android.gms:play-services-gcm:7.5.0
Google Drive com.google.android.gms:play-services-drive:7.5.0
Google Fit com.google.android.gms:play-services-fitness:7.5.0
Google Location, Activity Recognition, and Places com.google.android.gms:play-services-location:7.5.0
Google Maps com.google.android.gms:play-services-maps:7.5.0
Google Mobile Ads com.google.android.gms:play-services-ads:7.5.0
Google Nearby com.google.android.gms:play-services-nearby:7.5.0
Google Panorama Viewer com.google.android.gms:play-services-panorama:7.5.0
Google Play Game services com.google.android.gms:play-services-games:7.5.0
SafetyNet com.google.android.gms:play-services-safetynet:7.5.0
Google Wallet com.google.android.gms:play-services-wallet:7.5.0
Android Wear com.google.android.gms:play-services-wearable:7.5.0