nizwar / screen_capture_event

Catch screen capture (Screenshot & Screen Record) event for Android and iOS
https://pub.dev/packages/screen_capture_event
MIT License
9 stars 36 forks source link

java.lang.NoSuchMethodError No direct method <init>(Ljava/io/File;)V in class Landroid/os/FileObserver; or its super classes (declaration of 'android.os.FileObserver' appears in #25

Open yoferzhang opened 11 months ago

yoferzhang commented 11 months ago

Android 9,level 28

0
java.lang.NoSuchMethodError: No direct method <init>(Ljava/io/File;)V in class Landroid/os/FileObserver; or its super classes (declaration of 'android.os.FileObserver' appears in /system/framework/framework.jar!classes2.dex)
1
id.nizwar.screen_capture_event.ScreenCaptureEventPlugin$3.void <init>(id.nizwar.screen_capture_event.ScreenCaptureEventPlugin,java.io.File,java.io.File)(ScreenCaptureEventPlugin.java:169)
2
id.nizwar.screen_capture_event.ScreenCaptureEventPlugin.void updateScreenRecordStatus()(ScreenCaptureEventPlugin.java:169)
3
id.nizwar.screen_capture_event.ScreenCaptureEventPlugin.void onMethodCall(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result)(ScreenCaptureEventPlugin.java:76)
4
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.void onMessage(java.nio.ByteBuffer,io.flutter.plugin.common.BinaryMessenger$BinaryReply)(MethodChannel.java:262)
5
io.flutter.embedding.engine.dart.DartMessenger.void invokeHandler(io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo,java.nio.ByteBuffer,int)(DartMessenger.java:295)
6
io.flutter.embedding.engine.dart.DartMessenger.void lambda$dispatchMessageToQueue$0(java.lang.String,io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo,java.nio.ByteBuffer,int,long)(DartMessenger.java:319)
7
io.flutter.embedding.engine.dart.DartMessenger.void lambda$dispatchMessageToQueue$0$DartMessenger(java.lang.String,io.flutter.embedding.engine.dart.DartMessenger$HandlerInfo,java.nio.ByteBuffer,int,long)(DartMessenger.java:0)
8
io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(-.java:12)
kimiaki704 commented 10 months ago

I'm also having the same problem. We have confirmed that this is occurring on the Huawei P20 Lite, P30 Pro, and Mate 20 Pro with Android 9.

zhakiro commented 7 months ago

Any updates for this? This is also causing some problems for some devices running the older version of Android