简体   繁体   中英

Error while uploading image using image picker in emulator - Flutter app

Please how can I fix this error? I use the image picker but when I select the image in the gallery from the emulator it doesn't appear.

Here is the complete error text:

D/EGL_emulation(19810): eglMakeCurrent: 0xa70bcb40: ver 2 0 (tinfo 0x9395e330)

W/GooglePlayServicesUtil(19810): Google Play services out of date for com.example.chat_app. Requires 12451000 but found 11743470

I/art (19810): Do partial code cache collection, code=22KB, data=30KB I/art (19810): After code cache collection, code=20KB, data=30KB I/art (19810): Increasing code cache capacity to 128KB

D/EGL_emulation(19810): eglMakeCurrent: 0xa70bc3c0: ver 2 0 (tinfo 0xa70c0bd0) D/EGL_emulation(19810): eglMakeCurrent: 0xa70bc3c0: ver 2 0 (tinfo 0xa70c0bd0) D/EGL_emulation(19810): eglMakeCurrent: 0xa70bcb40: ver 2 0 (tinfo 0x9395e330)

E/flutter (19810): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'XFile' is not a subtype of type 'File?' in type cast E/flutter (19810): #0
_UserImagePickerState._pickedImage. (package:chat_app/widgets/pickers/user_image_picker.dart:19:37) E/flutter (19810): #1 State.setState (package:flutter/src/widgets/framework.dart:1121:30) E/flutter (19810): #2 _UserImagePickerState._pickedImage (package:chat_app/widgets/pickers/user_image_picker.dart:18:5) E/flutter (19810): E/flutter (19810):

I think, that this string: "Google Play services out of date for com.example.chat_app. Requires 12451000 but found 11743470" says about use out of dated version of Android needed to using widget.

try to use newer version of Android in your emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM