-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolep: android_alarm_managerThe Android background execution pluginThe Android background execution pluginp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallywaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
Flutter image_picker and android_alarm_manager plugins are NOT WORKING if both is installed.
I have tested it several times but it is not working. Please see the error below.
I/AlarmService(24713): Starting AlarmService...
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): Failed to handle method call
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.app.Activity.getExternalFilesDir(java.lang.String)' on a null object reference
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugins.imagepicker.ImagePickerPlugin.registerWith(ImagePickerPlugin.java:27)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:29)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at com.example.myapp.Application.registerWith(Application.java:18)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugins.androidalarmmanager.AlarmService.startAlarmService(AlarmService.java:65)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin.startService(AndroidAlarmManagerPlugin.java:75)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin.onMethodCall(AndroidAlarmManagerPlugin.java:52)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at android.os.MessageQueue.next(MessageQueue.java:143)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at android.os.Looper.loop(Looper.java:122)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at android.app.ActivityThread.main(ActivityThread.java:5253)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at java.lang.reflect.Method.invoke(Method.java:372)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913)
E/MethodChannel#plugins.flutter.io/android_alarm_manager(24713): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:708) 4.8s
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on Mi 4i is available at: http://127.0.0.1:3860/
For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
E/flutter (24713): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter (24713): PlatformException(error, Attempt to invoke virtual method 'java.io.File android.app.Activity.getExternalFilesDir(java.lang.String)' on a null object reference, null)
E/flutter (24713): #0 JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:149:7)
E/flutter (24713): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter (24713): <asynchronous suspension>
E/flutter (24713): #2 AndroidAlarmManager.initialize (package:android_alarm_manager/android_alarm_manager.dart:70:10)
E/flutter (24713): <asynchronous suspension>
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolep: android_alarm_managerThe Android background execution pluginThe Android background execution pluginp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallywaiting for PR to land (fixed)A fix is in flightA fix is in flight