如何删除,因为谷歌健身API 7.5.0添加权限 [英] How to remove a permission added because of Google Fitness API 7.5.0

查看:266
本文介绍了如何删除,因为谷歌健身API 7.5.0添加权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新我的播放服务,健身API从7.0.0到7.5.0后,我注意到,当我去到新版本上传到它告诉我,我加入一个新的权限和2个新的功能PlayStore。我没有做到这一点!天哪,发生什么了。

After updating my play-services-fitness api from 7.0.0 to 7.5.0 I noticed that when I go to upload a new build to the PlayStore it tells me that I am adding a new permission and 2 new features. I did not do this! What the heck.

推荐答案

做了一些研究,以牵制的罪魁祸首它实际上是播放服务,健身后:7.5.0,这是罪魁祸首。通过包括在您的项目(编译com.google.android.gms:玩-服务,健身:7.5.0),并编译它会注入<使用-权限的Andr​​oid:名称=android.permission.ACCESS_COARSE_LOCATION/> 到您的Andr​​oidManifest.xml。所以PlayStore是正确的,你要求使用新的权限和功能。 /AndroidManifest.xml文件|您可以通过检查你的编译/中介机构/舱单/全/ [发布调试]证实了这一点。在那里,你将看到新添加的权限。要删除这一点,你只需添加<使用-权限的Andr​​oid:名称=android.permission.ACCESS_COARSE_LOCATION工具:节点=删除/> 来自己的清单和在清单合并过程中,它会被剥离出来。 你会崩溃,如果/当你使用一个健身的API,需要该权限,但如果你能保证你不会使用它,然后你有它。

After doing some research to pin down the culprit it was in fact play-services-fitness:7.5.0 that was to blame. By including that in your project (compile 'com.google.android.gms:play-services-fitness:7.5.0') and compiling it will inject the <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> into your AndroidManifest.xml. So the PlayStore is correct, you are asking to use new permissions and features. You can confirm this by checking your build/intermediaries/manifests/full/[debug|release]/AndroidManifest.xml file. There you will see the new permission added. To remove this you simply add <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" tools:node="remove" /> to your own manifest and it will be stripped out during the manifest merge process. You will crash if/when you do use a Fitness API that requires that permission but if you can guarantee that you won't use it then there you have it.

这篇关于如何删除,因为谷歌健身API 7.5.0添加权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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