From 14dc0ee3d40c3cb83d6496bcdf393dc5171f2aca Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Sun, 8 Sep 2024 07:51:45 +0200 Subject: [PATCH] Remove dependency to app_review flutter package due to incompatibility with old version of com.google.android.play:core Error message when uploading bundle to Google Play Store: ``` Update your com.google.android.play:core:1.8.0 Maven dependency to an Android 14 compatible version! Your current com.google.android.play:core:1.8.0 library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers. As a reminder, from August 31, 2024, Google Play requires all new app releases to target Android 14. Update to the latest library version dependency to avoid app crashes. ``` --- mobile/lib/main.dart | 41 +++++++++++++++++++++-------------------- mobile/pubspec.lock | 14 -------------- mobile/pubspec.yaml | 2 +- 3 files changed, 22 insertions(+), 35 deletions(-) diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 28479dbc..36d6af18 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -36,11 +36,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:app_review/app_review.dart'; +//import 'package:app_review/app_review.dart'; const contactEmailAddress = "apps+dev_feed@rm3l.org"; -enum AppBarMenuItem { ABOUT, SEND_FEEDBACK, RATING } +//enum AppBarMenuItem { ABOUT, SEND_FEEDBACK, RATING } +enum AppBarMenuItem { ABOUT, SEND_FEEDBACK } // final alice = Alice(showNotification: true, darkTheme: true); @@ -88,12 +89,12 @@ class _DevFeedState extends State with TickerProviderStateMixin { void initState() { super.initState(); - AppReview.getAppID.then((onValue) { - setState(() { - appID = onValue; - }); - print("App ID: $appID"); - }); + //AppReview.getAppID.then((onValue) { + // setState(() { + // appID = onValue; + // }); + // print("App ID: $appID"); + //}); _navigationViews = [ NavigationIconView( @@ -204,9 +205,9 @@ class _DevFeedState extends State with TickerProviderStateMixin { value: AppBarMenuItem.ABOUT, child: const Text('About')), const PopupMenuItem( value: AppBarMenuItem.SEND_FEEDBACK, - child: const Text('Send Feedback')), - const PopupMenuItem( - value: AppBarMenuItem.RATING, child: const Text('Rate this app!')) + child: const Text('Send Feedback')) + //const PopupMenuItem( + // value: AppBarMenuItem.RATING, child: const Text('Rate this app!')) ]); return Scaffold( @@ -220,15 +221,15 @@ class _DevFeedState extends State with TickerProviderStateMixin { case AppBarMenuItem.ABOUT: showGalleryAboutDialog(_scaffoldKey.currentContext); break; - case AppBarMenuItem.RATING: - { - AppReview.requestReview.catchError((onError) { - Scaffold.of(context).showSnackBar(SnackBar( - content: Text("Error: ${onError.toString()}"), - )); - }); - } - break; + //case AppBarMenuItem.RATING: + // { + // AppReview.requestReview.catchError((onError) { + // Scaffold.of(context).showSnackBar(SnackBar( + // content: Text("Error: ${onError.toString()}"), + // )); + // }); + // } + // break; case AppBarMenuItem.SEND_FEEDBACK: { //TODO For now, open up the default email address, diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 7c89b0db..e5648621 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -15,13 +15,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.41.2" - app_review: - dependency: "direct main" - description: - name: app_review - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" archive: dependency: transitive description: @@ -226,13 +219,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.2" http_parser: dependency: transitive description: diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 4af892ac..83f0a1c8 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -50,7 +50,7 @@ dependencies: fluro: ^2.0.5 pigment: ^1.0.4 - app_review: "^2.0.1" + # app_review: "^2.1.2+1" dio: ^3.0.10 dio_http_cache: ^0.2.11 # alice: ^0.1.5