简体   繁体   English

将gradle构建仅依赖于Google地图

[英]Depend gradle build on google maps only

My project depends on maps. 我的项目取决于地图。 So I have compile 'com.google.android.gms:play-services-maps:7.0.0' in my build.gradle file. 因此,我在build.gradle文件中compile 'com.google.android.gms:play-services-maps:7.0.0' But gradle downloads all the play services, including fitness, games, wallet, etc. How to depend just on map and it's dependencies, but not the whole play-services? 但是gradle下载了所有的播放服务,包括健身,游戏,钱包等。如何仅依赖于地图及其相关性,而不是整个播放服务?

Ok, I found a problem. 好的,我发现了一个问题。 The issue was that gradle was configured to work in offline and for unknown reason it was adding all the play-services into the project (perhaps, because full play-services was the only downloaded dependency, that contained play-services-maps). 问题是gradle配置为可以脱机工作,并且出于未知原因,它正在将所有播放服务添加到项目中(也许是因为,完整的播放服务是唯一下载的依赖项,其中包含了play-services-maps)。 Allowing gradle to work online and doing gradle sync — and viola, now only play-services-base and play-services-maps are dependencies. 允许gradle在线工作并进行gradle同步-中提琴现在只依赖于play-services-baseplay-services-maps

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM