拍照demo获取不到照片
来源:6-15 拍照APP开发-拍照配置与AndroidX兼容处理【实战尝鲜】
叶乔
2021-03-23
5-15 实战课程中再执行了拍照后,获取不到图片
报错如下:
W/Binder ( 4303): Caught a RuntimeException from the binder stub implementation.
W/Binder ( 4303): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Binder:4303_4
W/Binder ( 4303): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:992)
W/Binder ( 4303): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:779)
W/Binder ( 4303): at io.flutter.embedding.engine.dart.DartMessengerReply.reply(DartMessenger.java:144)W/Binder(4303):atio.flutter.plugin.common.MethodChannelReply.reply(DartMessenger.java:144)
W/Binder ( 4303): at io.flutter.plugin.common.MethodChannelReply.reply(DartMessenger.java:144)W/Binder(4303):atio.flutter.plugin.common.MethodChannelIncomingMethodCallHandler$1.success(MethodChannel.java:238)
W/Binder ( 4303): at io.flutter.plugins.imagepicker.ImagePickerDelegate.finishWithSuccess(ImagePickerDelegate.java:462)
W/Binder ( 4303): at io.flutter.plugins.imagepicker.ImagePickerDelegate.handleImageResult(ImagePickerDelegate.java:431)
W/Binder ( 4303): at io.flutter.plugins.imagepicker.ImagePickerDelegate.access$000(ImagePickerDelegate.java:65)
W/Binder ( 4303): at io.flutter.plugins.imagepicker.ImagePickerDelegate$4.onPathReady(ImagePickerDelegate.java:398)
W/Binder ( 4303): at io.flutter.plugins.imagepicker.ImagePickerDelegate$31.onScanCompleted(ImagePickerDelegate.java:150)W/Binder(4303):atandroid.media.MediaScannerConnection1.onScanCompleted(ImagePickerDelegate.java:150)
W/Binder ( 4303): at android.media.MediaScannerConnection1.onScanCompleted(ImagePickerDelegate.java:150)W/Binder(4303):atandroid.media.MediaScannerConnectionClientProxy.onScanCompleted(MediaScannerConnection.java:201)
W/Binder ( 4303): at android.media.MediaScannerConnection1.scanCompleted(MediaScannerConnection.java:54)W/Binder(4303):atandroid.media.IMediaScannerListener1.scanCompleted(MediaScannerConnection.java:54)
W/Binder ( 4303): at android.media.IMediaScannerListener1.scanCompleted(MediaScannerConnection.java:54)W/Binder(4303):atandroid.media.IMediaScannerListenerStub.onTransact(IMediaScannerListener.java:97)
W/Binder ( 4303): at android.os.Binder.execTransactInternal(Binder.java:1028)
W/Binder ( 4303): at android.os.Binder.execTransact(Binder.java:1001)
1回答
-
叶乔
提问者
2021-03-23
更换新版image_picker已经解决!
012021-03-24
相似问题