【问题标题】:How to fix 'APK is using permissions that require a privacy policy: (android.permission.CAMERA)' error in play console如何修复播放控制台中的“APK 正在使用需要隐私策略的权限:(android.permission.CAMERA)”错误
【发布时间】:2019-06-01 15:00:17
【问题描述】:

我正在将我的颤振应用程序设置为在播放控制台上上传,但它显示错误- “您的 APK 或 Android App Bundle 正在使用需要隐私政策的权限:(android.permission.CAMERA)。” 即使我没有在清单文件中使用相机权限。

主/清单文件-

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="Motive Booster"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <!-- This keeps the window background of the activity showing
             until Flutter renders its first frame. It can be removed if
             there is no splash screen (such as the default splash screen
             defined in @style/LaunchTheme). -->
        <meta-data
            android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
            android:value="true" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

我该如何解决这个问题?

【问题讨论】:

  • 检查一次您的应用程序依赖项,例如 Gallery 或任何库可能使用的。首先在您的项目中查找
  • 你解决了吗?

标签: flutter camera google-play-console


【解决方案1】:

您的其中一个依赖项必须具有相机权限。

要删除它,您可以将其添加到清单中:

<manifest ... xmlns:tools="http://schemas.android.com/tools">
    ...
    <uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
    ...
</manifest>

【讨论】:

  • 它在构建时出错-出了什么问题:任务':app:generateReleaseBuildConfig'的执行失败。 > 无法从 C:\Users\Azhan Khan\AndroidStudioProjects\simple_motivation\android\app\src\main\AndroidManifest.xml 读取 packageName
猜你喜欢
  • 2021-06-13
  • 2023-03-13
  • 2017-10-21
  • 1970-01-01
  • 2017-05-05
  • 1970-01-01
  • 2018-03-21
  • 2017-10-21
相关资源
最近更新 更多