【发布时间】:2021-06-13 14:38:05
【问题描述】:
我正在将我的 Flutter 应用设置为在 Play 控制台上上传,但它显示错误-“您的 APK 或 Android App Bundle 正在使用需要隐私政策的权限:(android.permission.CAMERA)。”
我试图解决这个问题。我已经在清单文件中使用了相机权限。我怎么解决这个问题 ?
主/清单文件:
<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
【问题讨论】:
-
如果有效,请接受我的回答。
标签: flutter dart camera google-play