Open cruvie opened 2 months ago
@Lonyless hi, did you solve the problem?
@Lonyless hi, did you solve the problem?
Turns out the problem wasn’t caused by this package, but a bug in the emulator itself. Try running Android 11 to make sure
I came across the same problem. It happens when trying to build the APK in release mode. Debug mode seems fine.
In my case, however, it happend after upgrading Android Studio from Koala to Ladybug. It seems that Koala is bundled with JDK17 and Ladybug JDK21. Making Flutter use JDK17 lets me build the APK the usual way (no blocking when starting the application).
Show Flutter Java version for building
flutter doctor -v
Change Flutter Java version for building
flutter config --jdk-dir "/Applications/Android Studio Koala.app/Contents/jbr/Contents/Home/"
By the way, I am initializing the FlutterLocalNotificationsPlugin in the main method.
EDIT: Building using JDK21 with coreLibraryDesugaringEnabled, and JDK17 without coreLibraryDesugaringEnabled.
It took me so much time to figure this out. After I rollback the com.android.application
dependency, everything works fine.
// Before
id "com.android.application" version "8.2.0" apply false
// After
id "com.android.application" version "8.7.2" apply false
Describe the bug flutterLocalNotificationsPlugin.initialize block app open in release mode, but works fine in debug
To Reproduce git clone https://github.com/cruvie/demo flutter build apk install build/app/outputs/flutter-apk/app-release.apk on any android platform the app is blocked and cannot enter home page
Expected behavior after installing can open the app with no blocking
Sample code to reproduce the problem main.dart
local_notification.dart
flutter docker
flutter_local_notifications version 17.2.2 failed on android 14 physical or android 15 emulator