拍照项目Android真机跑报错
来源:6-17 本章小结
IT小菜
2019-05-14
05-14 16:52:42.465 28995-29010/com.yxjie.flutter_base_demo E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(already_active, Image picker is already active, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
#2 ImagePicker.pickImage (package:image_picker/image_picker.dart:56:40)
#3 _PhotoPageState.getImage (package:flutter_base_demo/photo_page.dart:19:35)
#4 _PhotoPageState._itemBtn. (package:flutter_base_demo/photo_page.dart:82:22)
#5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:511:14)
#6 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:566:30)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:166:24)
#8 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:240:9)
#9 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:211:7)
#10 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#11 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:225:20)
#12 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:199:22)
#13 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
#14 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
#15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
#16 _rootRunUnary (dart:async/zone.dart:1136:13)
#17 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#18 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#19 _invoke1 (dart:ui/hooks.dart:233:10)
#20 _dispatchPointerDataPacket (dart:ui/hooks.dart:154:5)
1回答
-
运行:
fltter clean
之后在试下,可参考:https://stackoverflow.com/questions/54737551/flutter-image-picker-is-already-active-null-exception
012019-05-15
相似问题