android - 来自 Play 商店的 QUERY_ALL_PACKAGES 警告,即使该权限没有出现在 AndroidManifest.xml 合并文件中

标签 android kotlin package visibility cometchat

我正在编写这个 Android 应用程序,我正在使用 CometChat 库向我的应用程序添加聊天功能。 当我使用最新或最旧的版本执行此操作时,我获得了自动添加到我的 android manifest.xml 文件中的权限 => QUERY_ALL_PACKAGES 我与 Cometchat 支持 2.1.2-beta8 进行了交谈,所以我更改了 android调用sdk的版本 实现 'com.cometchat:pro-android-calls-sdk:2.1.2-beta8' 和 grep -r QUERY_ALL_PACKAGES * 什么都不返回。 但是当我打包我的应用程序并将其发送到 Play 商店时,我仍然遇到该错误 https://support.google.com/googleplay/android-developer/answer/10158779?hl=en-GB

我能看到的唯一罪魁祸首是 comet chat ui kit Kotlin 中的 MediaUtils.kt

调用 queryIntentActivities 的地方可能会产生该问题 -> https://github.com/cometchat-pro/android-kotlin-chat-ui-kit/blob/v3/uikit-kotlin/src/main/java/com/cometchat/pro/uikit/ui_resources/utils/MediaUtils.kt

我该怎么办? 根据 https://developer.android.com/training/package-visibility

我应该添加一些看起来像那样的东西

<queries>
    <intent>
        <action android:name="android.support.customtabs.action.CustomTabsService" />
    </intent>
    <intent>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="http" />
    </intent>
    <intent>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
    <intent>
        <action android:name="android.intent.action.GET_CONTENT" />
    </intent>
</queries>

最佳答案

感谢 Cometchat 的支持,该问题的解决方案是将该库放入该特定版本 实现 'com.cometchat:pro-android-calls-sdk:2.1.2-beta8'

它将从权限中删除 QUERY_ALL_PACKAGES。 另一个版本神奇地将该权限添加到最终 list 中。我的代码库中没有其他代码添加该权限。

关于android - 来自 Play 商店的 QUERY_ALL_PACKAGES 警告,即使该权限没有出现在 AndroidManifest.xml 合并文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72414723/

相关文章:

java - 我有两种不同类型的用户,即司机和乘客。我想在登录页面中,如果是驾驶员的登录,则仅应授权驾驶员

eclipse - 为什么无法加载主方法

c# - Unity (C#) -> Kotlin <- 协程

perl - 如何在 perl 中包含和使用 pm 文件

java - "Cannot subclass the final class"错误,但类不是最终的

android - ConstraintLayout 在 Android L 设备上表现异常

java - 将 String[] 传递给另一个 Android 类(使用 Intent )

android - ExpandableListView in ViewFlipper显示问题?

kotlin - 从 Kotlin 中的 lambda 表达式显式返回

asp.net - 为什么我的项目引用没有被 Visual Studio 中的 Web 部署打包获取?