如何找到依赖项使用的权限? - 安卓
我正在尝试将Android应用上传到Play商店,但是由于背景位置的许可,请继续被拒绝:“ 功能不符合背景位置访问的要求 ”。
我的清单声明Access_Fine_Location和Access_coarse_location,但不包括Access_Background_location。由于我的应用目标API 30和最小API为29,因此我不会隐式使用背景位置。
但是,当我将应用程序上传到Play商店时,我可以看到我的捆绑包包括android.permission.access_background_location,这使我相信我的应用程序中的某些依赖性正在使用此许可。
这可能吗?如果是这样,我怎么能找到哪个?
I'm trying to upload my Android app to the Play Store, but keep being refused because of background location permission: "Feature does not meet requirements for background location access".
My manifest declares ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION, but does not include ACCESS_BACKGROUND_LOCATION. As my app target API 30 and the minimum API is 29 I am not implicitly using background location.
Yet, when I upload my app in the Play Store I can see that my bundle includes android.permission.ACCESS_BACKGROUND_LOCATION which leaves me to believe that some dependency in my app is using this permission.
Is this possible? If so, how could I find which is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有时,我们确实需要列出依赖关系引入的所有权限。这是我写的脚本。将此脚本添加到您的应用程序build.gradle,
然后通过
gradlew:app:listPermissions
来列出每个依赖性使用的所有权限。例如,Sometimes we do need to list all permissions introduced by our dependencies. Here is the script I wrote to do this. Add this script to your app build.gradle,
Then run the gradle task by
gradlew :app:listpermissions
to list all permission used by each dependecy. For example,