每个Google Play服务组件需要哪些权限? [英] What permissions are needed by each Google Play Services component?

查看:1122
本文介绍了每个Google Play服务组件需要哪些权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如我在发现的那样在包含Google Play服务库时,权限会自动添加到我的AndroidManifest中,各种Google Play服务组件会从Google Play服务7.5中隐式添加您的应用的权限。但显然不是所有组件都需要相同的权限 - 例如,play-services-games:7.8.0不需要任何。



有没有一种简单的方法可以告诉特定的Google Play服务组件会添加什么权限?

访问 $ ANDROID_SDK / extras /谷歌/ m2repository / COM /谷歌/克。在那里,选择你想要的工件(例如, play-services-maps )和版本(例如, 8.1.0 )。在你最喜欢的ZIP工具中打开AAR,查看那里发布的 AndroidManifest.xml 文件,看看是否有< uses-权限> 元素。然后,打开POM文件,查看它们之间的依赖关系,并为这些依赖关系的AAR重复该过程。


As I found out in Why are permissions being automatically added to my AndroidManifest when including Google Play Services library, various Google Play Services components implicitly add permissions to your app starting in Google Play Services 7.5. But obviously not all components require the same permissions - for instance, play-services-games:7.8.0 doesn't require any.

Is there an easy way to tell what permissions will be added by a particular Google Play Services component?

解决方案

Visit $ANDROID_SDK/extras/google/m2repository/com/google/gms. In there, choose your desired artifact (e.g., play-services-maps) and version (e.g., 8.1.0). Open up the AAR in your favorite ZIP utility, and look at the AndroidManifest.xml file published in there, to see if there are <uses-permission> elements. Then, open up the POM file, see what dependencies there are, and repeat the process for the AARs for those dependencies.

这篇关于每个Google Play服务组件需要哪些权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆