You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter应用因QUERY_ALL_PACKAGES权限遭Play Store驳回求助

Flutter应用提交Google Play被驳回:QUERY_ALL_PACKAGES权限问题

问题背景

我的Flutter应用提交至Google Play Store后多次被驳回,具体驳回原因:

问题:应使用更窄范围的应用可见性方法
我们无法批准您的应用使用QUERY_ALL_PACKAGES权限,因为声明的任务可通过更窄范围的应用可见性方法实现。

我已经检查了本地的AndroidManifest.xml,也查看了合并清单文件,但都没找到QUERY_ALL_PACKAGES权限声明,所用插件也没发现使用该权限的情况,多次重新提交仍被拒,求解决思路。

我的配置文件

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.example">

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <queries>
        <package android:name="com.android.chrome" />
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="https" />
        </intent>
        <intent>
            <action android:name="android.intent.action.DIAL" />
            <data android:scheme="tel" />
        </intent>
        <intent>
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="*/*" />
        </intent>
    </queries>

    <application
        android:label="Example"
        android:name="${applicationName}"
        android:icon="@mipmap/launcher_icon">

        <meta-data android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/ic_launcher" />
        <meta-data android:name="com.dieam.reactnativepushnotification.default_notification_channel_id"
            android:value="@string/default_notification_channel_id" />

        <service
            android:name=".firebase.FirebaseMessagingService"
            android:exported="true">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>

pubspec.yaml

version: 1.0.3+4

environment:
  sdk: ">=2.17.1 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2
  get: ^4.6.5
  shared_preferences: ^2.0.8
  url_strategy: ^0.2.0 # remove # symbol from the flutter web
  fluttertoast: ^8.0.8
  connectivity: ^3.0.6
  http: ^0.13.3
  animated_bottom_navigation_bar: ^0.3.3
  intl: ^0.17.0
  permission_handler: ^9.2.0
  url_launcher: ^6.0.12
  geocoding: ^2.0.1
  geolocator: ^8.2.1
  flutter_switch: ^0.3.2
  firebase_messaging: ^11.2.8
  firebase_core: ^1.21.1
  file_picker: ^4.1.6

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.9.2
  flutter_lints: ^2.0.0
  icons_launcher: ^2.0.1

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/app_logo1.jpg"

flutter:
  uses-material-design: true
  assets:
    - assets/

排查解决建议

  • 深度核查合并清单:用Android Studio打开项目,切换到Merged Manifest标签,查看Manifest Merging Report,搜索QUERY_ALL_PACKAGES,定位是哪个依赖库引入的该权限。
  • 升级插件版本:部分旧版本插件(如permission_handler、file_picker)会默认引入全权限,尝试将所有依赖插件升级到最新稳定版,新版本通常会用<queries>替代QUERY_ALL_PACKAGES。
  • 主动移除权限:在AndroidManifest.xml中添加移除声明,确保合并时剔除该权限:
    <!-- 先在manifest标签添加tools命名空间 -->
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      package="com.example.example">
    
    <!-- 添加移除声明 -->
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:node="remove"/>
    
  • 检查Play控制台声明:确认Google Play控制台中是否误填了需要QUERY_ALL_PACKAGES的功能描述,修改为符合现有<queries>范围的说明。

内容的提问来源于stack exchange,提问作者Anandh Krishnan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 11:37:01