如何修复“APK 正在使用需要 Play 控制台中的隐私政策错误的 CAMERA 权限?”

How to fix 'APK is using CAMERA permissions that require a privacy policy error in play console?

我正在将我的 flutter 应用程序设置为在 Play 控制台上上传,但它显示错误-“您的 APK 或 Android App Bundle 正在使用需要隐私政策的权限:(android.permission.CAMERA)。 “

我正在尝试解决这个问题。我已经在我的清单文件中使用相机权限。我怎么解决这个问题 ?

main/manifest 文件:

  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.subidhacustomermobileappv2">
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
  <uses-permission android:name="android.permission.CAMERA"/>
  <uses-permission android:name="android.permission.WAKE_LOCK"/>

  <application
      android:name=".Application"
      android:label="Example"
      android:icon="@mipmap/ic_launcher">
      <activity
          android:name=".MainActivity"
          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">
          <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>

          <intent-filter>
              <action android:name="FLUTTER_NOTIFICATION_CLICK" />
              <category android:name="android.intent.category.DEFAULT" />
          </intent-filter>
      </activity>
      <!-- Don't delete the meta-data below.
           This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
      <meta-data
          android:name="flutterEmbedding"
          android:value="2" />

      <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
          <intent-filter>
              <action android:name="android.intent.action.BOOT_COMPLETED"></action>
          </intent-filter>
      </receiver>
      <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />

      <service
          android:name="io.flutter.plugins.androidalarmmanager.AlarmService"
          android:permission="android.permission.BIND_JOB_SERVICE"
          android:exported="false"/>
      <receiver
          android:name="io.flutter.plugins.androidalarmmanager.AlarmBroadcastReceiver"
          android:exported="false"/>
      <receiver
          android:name="io.flutter.plugins.androidalarmmanager.RebootBroadcastReceiver"
          android:enabled="false">
          <intent-filter>
              <action android:name="android.intent.action.BOOT_COMPLETED"></action>
          </intent-filter>
      </receiver>

  </application>
</manifest>

pubspec.yaml 文件是:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  json_annotation: ^3.0.1
  shared_preferences: ^0.5.7+2
  flutter_local_notifications: ^1.4.3
  rxdart: ^0.24.0
  provider: ^4.0.5+1
  easy_localization: ^2.3.2
  # double_back_to_close_app: ^1.2.0
  double_back_to_close_app: ^2.0.1
  image_picker: ^0.6.6+4
  photo_view: ^0.9.2
  http: ^0.12.1
  dio: ^3.0.9
  fluttertoast: ^4.0.1
  cached_network_image: ^2.2.0+1
  expandable: ^4.1.4
  flutter_datetime_picker: ^1.4.0
  firebase_storage: ^3.1.3
  webview_flutter: ^0.3.22+1
  sslcommerz: ^0.0.1
  toast: ^0.1.5
  dropdown_search: 0.4.4
  android_intent: ^0.3.7+3
  table_calendar: ^2.2.3
  smooth_star_rating: 1.1.1
  url_launcher: ^5.7.1
  crisp: ^0.1.3
  firebase_core: ^0.4.0+9
  firebase_database: ^3.1.3
  firebase_messaging: ^5.1.2
  intl: ^0.16.1
  clipboard_manager: ^0.0.4
  android_alarm_manager: 0.4.5+14
  device_apps: ^1.2.0
  camera: ^0.5.8+17

您的应用 manifest.xml 具有这些权限,可以从您的设备访问信息,但您在 Play 商店提交时没有隐私政策 link。所以你收到这个警告。

您必须为商店添加隐私政策。 转到 Google Play 管理中心,Select 商店首选项 > 应用内容。在“隐私政策”下添加隐私政策 URL。 注意:这个 url 应该是 public。它可以来自任何网站。如果您的应用程序有网站,则使用该网站的形式,但如果没有,则您可以从第 3 方使用它。