srawlins / timezone

Time zone database and time zone aware DateTime object for Dart.
BSD 2-Clause "Simplified" License
101 stars 52 forks source link

does not work #163

Closed SwiftSpotter closed 1 year ago

SwiftSpotter commented 1 year ago

I got this error that closes the app when using this package with Flutter local notification.

FATAL EXCEPTION: main E/AndroidRuntime( 3514): Process: com.example.word, PID: 3514 E/AndroidRuntime( 3514): java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/LocalDateTime; E/AndroidRuntime( 3514): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.zonedScheduleNotification(FlutterLocalNotificationsPlugin.java:540) E/AndroidRuntime( 3514): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.zonedSchedule(FlutterLocalNotificationsPlugin.java:1453) E/AndroidRuntime( 3514): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(FlutterLocalNotificationsPlugin.java:1305) E/AndroidRuntime( 3514): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258) E/AndroidRuntime( 3514): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/AndroidRuntime( 3514): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:322) E/AndroidRuntime( 3514): at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$2j2MERcK825A5j1fv5sZ7xB2Iuo.run(lambda) E/AndroidRuntime( 3514): at android.os.Handler.handleCallback(Handler.java:751) E/AndroidRuntime( 3514): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 3514): at android.os.Looper.loop(Looper.java:154) E/AndroidRuntime( 3514): at android.app.ActivityThread.main(ActivityThread.java:6190) E/AndroidRuntime( 3514): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 3514): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892) E/AndroidRuntime( 3514): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782) E/AndroidRuntime( 3514): Caused by: java.lang.ClassNotFoundException: Didn't find class "java.time.LocalDateTime" on path: DexPathList[[zip file "/data/app/com.example.word-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.word-1/lib/x86, /data/app/com.example.word-1/base.apk!/lib/x86, /system/lib, /vendor/lib]] E/AndroidRuntime( 3514): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) E/AndroidRuntime( 3514): at java.lang.ClassLoader.loadClass(ClassLoader.java:380) E/AndroidRuntime( 3514): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) E/AndroidRuntime( 3514): ... 14 more

srawlins commented 1 year ago

The stack trace you posted indicate you are using a Java program. This package is not Java code.

SwiftSpotter commented 1 year ago

How can I not use the Java, can you guide me more how to fix the error?