New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flutter_local_notifications] Upgraded Android Gradle Plugin to fix Android build #1781
Conversation
I had to remove the dependency on |
Thanks for the PR but can you provide more details on how to reproduce this issue? I know the example app has an issue compiling but found that updating the Kotlin allows it to build and run fine. Is the issue you're trying to fix the same as #1771? If so, did you add the following to one of the Gradle scripts in your app as it is one of the solutions using AGP 4.x
This should only be needed in your app and not the plugin. Trying to see if it's absolutely necessary to bump AGP as my understanding is the Flutter SDK has tooling to check if an app is using a supported version of Gradle and bumping Gradle and/or AGP would then require bumping the minimum Flutter SDK version supported by the plugin Edit: FYI getting in a fix for Kotlin version in separately myself so I can get an update out |
Android Studio started shipping with Java 17 which requires higher AGP versions, which in turn require higher Kotlin versions. If you want a really easy way to reproduce the issue, download Android Studio Canary and try to build the example app with it. I don't think this issue is related to that other one. Many popular plugins are on Kotlin 1.7+ and AGP 7+: |
Thanks for the reply. Needed more details as the original post only contained a trace. I'm aware of how plugins have moved to AGP 7+ but I had seen some remain on 3.x. An example of this is https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/android/build.gradle. This PR was also missing a bump in Flutter SDK requirement as someone using Flutter SDK 2.8 will run into an unsupported Android plugin version error. I don't have a problem with having AGP bumped as I was planning to do this too but would like to see the following done in the PR prior to it being merged in
Let me know your thoughts |
Wait does it make sense to update the timezone package in a separate PR? |
Yep so what I meant was to leave the example app to continue to https://pub.dev/packages/flutter_native_timezone and make it point to the fork later on. Even the fork is on AGP 4.2.2 |
Well the android build fails because of that timezone plugin, but is this good enough now? |
That's a shame, in that case could you revert the revert then so it goes back to using the fork? Better that it runs than fails |
This reverts commit e876192.
…_flutter_local_notifications * commit '4b723e750d1371206520b10a122a444c4bba7475': (76 commits) [flutter_local_notifications] update docs on initialize method to describe callbacks more (MaikuB#1841) enable usePubspecOverrides with melos (MaikuB#1822) replaced placeholder.com with dummyimage.com in example app due to Cloudflare blocking requests (MaikuB#1821) Google Java Format [flutter_local_notifications] Fixes MaikuB#1486 :Adds ability to count down chronometer with chronometerCountDown (MaikuB#1778) Implement options to hide or crop attachments in the thumbnail on iOS (MaikuB#1785) bump linux plugin's Flutter version requirement to 3.0.0 and add explicit ffi dependency (MaikuB#1812) [flutter_local_notifications] re-add imports needed for Flutter 3.0 and add build tasks that use Flutter 3.0 (MaikuB#1811) updated example app to not request the ability to display critical alerts (MaikuB#1809) Add note about keeping `@mipmap/ic_launcher` resource (MaikuB#1804) Recommend WindowManager to fix Android 12L+ bugs (MaikuB#1803) [flutter_local_notifications] Upgraded Android Gradle Plugin to fix Android build (MaikuB#1781) [flutter_local_notifications] fixes parsing of callback handles for notification actions on Android (MaikuB#1798) [flutter_local_notifications] fix Kotlin version used in example app (MaikuB#1791) Updates readme for iOS Setup (MaikuB#1776) added missing kudos for contributions relating to flutter_local_notifications 12.0.3 release release flutter_local_notifications 12.0.3 updated code snippet in readme on requesting permissions on Android (MaikuB#1754) Google Java Format Drop registerWith in Android plugin (MaikuB#1745) ...
Fixes: