在我的 flutter 应用程序中,我没有使用任何警报,当上传到播放控制台时,它会警告我您的应用程序安排了精确的警报,而不检查是否已授予 SCHEDULE_EXACT_ALARM 权限。这会导致您的应用对于 Android 14 上的用户崩溃,因为默认情况下不再授予该权限。我已经测试了整个项目但没有收到任何此类警报。谁能告诉我如何解决这个问题。我附上我的 pubspec.yaml 和 manifest.xml,以便任何人都可以检查是否有任何问题。
`姓名:******** 描述:一个新的 Flutter 应用程序。
publish_to: "none" # 如果您想发布到 pub.dev,请删除此行
版本:4.0.0+16
环境: SDK:">=2.17.0 <4.0.0"
依赖关系: 扑: sdk:颤动
cupertino_icons:^1.0.2 http:^0.13.0 国际:^0.18.0 flutter_native_splash:^2.3.1 共享首选项:^2.0.6 mvc_pattern:^7.4.0 颤振吐司:^8.2.2 谷歌登录:^6.1.5 缓存网络图像:^3.1.0 地理定位器:^7.7.1 google_place:^0.4.3 google_maps_flutter:^2.0.9 权限处理程序:^8.3.0 carousel_slider: ^4.0.0 迪奥:^5.3.3 提供商:^6.0.0 google_maps_webservice:^0.0.20-nullsafety.2 google_api_headers:^1.3.0 元组:^2.0.0-nullsafety.0 flutter_polyline_points:^1.0.0 flutter_slidable:^3.0.0 数字选择器:^2.1.1 razorpay_flutter:^1.2.7 firebase_core:^2.15.0 cloud_firestore:^4.8.3 url_启动器:^6.1.11 照片视图:^0.14.0 路径提供者:^2.0.9 flutter_svg:^1.0.3 webview_flutter:^3.0.4 firebase_消息传递:^14.7.2 firebase_dynamic_links:^5.3.4 flutter_share:^2.0.0 得到:^4.6.5 flutter_cache_manager:^3.3.1
哑剧:^1.0.1 http_解析器:^4.0.0 路径:^1.8.0 文件选择器:^5.3.3 flutter_bloc:^7.2.0 可等同:^2.0.3 rxdart:^0.27.3 持续时间选择器:^1.1.0+1 图像选择器:^0.8.4+4 flutter_tags:^1.0.0-nullsafety.1 Country_state_city_picker:^1.2.8 设备信息加:^9.0.2 羡慕:^0.3.0+3 输入:^2.3.0 flutter_local_notifications:^9.8.0+1 分享_加:^4.5.3 lecle_downloads_path_provider:^0.0.1 应用程序设置:^4.2.0 pdf: ^3.10.1 打印:^5.6.6 打开文件:^3.3.2 向上滑动面板:^2.0.0+1 build_runner:^2.4.6 羡慕生成器: flutter_pdfview:^1.3.2 记录器:^2.0.2+1 flutter_inappwebview:^5.8.0 虚线边框:^2.1.0 webview_flutter_android:^2.10.4 设备预览:^1.1.0 firebase_crashlytics:^3.4.9 flutter_screenutil:^5.9.0
开发依赖项: 颤振测试: sdk:颤动 flutter_lints:^2.0.0
颤动: 使用材料设计:true
资产: - 资产/app_logo/ - 资产/图标/ - 资产/图标/订单/ - 资产/图像/ - 资产/json/
字体: 家族:蒙特塞拉特中等 字体: - 资产:字体/Montserrat-Medium.ttf - 家族:MontserratSemiBold 字体: - 资源:字体/Montserrat-SemiBold.ttf `
这是我的manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="*******">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="BitesVilla">
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/logo" />
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="${GMP_KEY}" />
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<!-- Deep linking -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="bitesvilla.page.link" android:pathPrefix="/"/>
<data android:scheme="http"
android:host="bitesvilla.page.link" android:pathPrefix="/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="high_importance_channel" />
<!-- 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:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver"/>
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
</application>
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
<!-- If your app checks for SMS support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
</queries>
请帮助某人。这很紧急。
您应该使用使用此权限的包。
您必须首先识别这个包裹。然后,检查该软件包是否有更新,并查看是否可以解决问题。
如果该软件包未维护,请尝试查看是否存在另一个执行相同操作的软件包并替换它。
如果这些都不能解决问题,您可以在 github 上 fork pacake,如果包不需要,请删除 SCHEDULE_EXACT_ALARM。如果需要,请阅读有关此内容的 Android 文档:https://developer.android.com/about/versions/14/changes/schedule-exact-alarms?hl=fr