Android 应用需要权限才能读取 USB 设备上的媒体

Android app needs permission to read media on usb device


我正在创建一个 android 应用程序并且我最近更新了它。但是现在该应用程序需要获得从 USB 设备读取数据的权限,即使我没有在任何地方使用它并且它不存在于我的 AndroidManifest.xml 中的任何地方。 我使用的唯一外部库是 Giftiz API、ADMob API 和 AdBuddiz API,在更新之前它只包含 ADMob API 和 AdBuddiz API ,所以新事物是 Giftiz API,但其他使用 Giftiz API 的应用程序不需要该权限。

有什么方法可以找到我在代码中请求该权限的位置吗? Android Studio 中的某种查找功能?
(这里是 link 到应用程序 Touchty Cube

问候

Is there any way to find where I'm requesting for that permission in the code?

您可以查看清单合并报告。假设您的应用位于名为 app/ 的模块中,您可以在 app/build/outputs/logs/manifest-merger-debug-report.txt 中找到 debug 构建的报告。阅读起来有点困难,但您会看到您的所有权限以及它们的来源:

uses-permission#android.permission.INTERNET
ADDED from com.google.android.gms:play-services-ads:7.5.0:20:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5
MERGED from com.google.android.gms:play-services-appinvite:7.5.0:19:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
MERGED from com.google.android.gms:play-services-wallet:7.5.0:20:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:21:5
  android:name
    ADDED from com.google.android.gms:play-services-ads:7.5.0:20:22
uses-permission#android.permission.ACCESS_NETWORK_STATE
ADDED from com.google.android.gms:play-services-ads:7.5.0:21:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
MERGED from com.google.android.gms:play-services-nearby:7.5.0:19:5
MERGED from com.google.android.gms:play-services-maps:7.5.0:20:5
  android:name
    ADDED from com.google.android.gms:play-services-ads:7.5.0:21:22

(来自 this blog post of mine