Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, convertImage): symbol not found) #9

Open
huuthongdev opened this issue May 10, 2021 · 2 comments

Comments

@huuthongdev
Copy link

I met a problem with this function

Convert conv = convertImageLib
      .lookup<NativeFunction<convert_func>>('convertImage')
      .asFunction<Convert>();
[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, convertImage): symbol not found)
#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31:29)
#0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:31:29)
#1      convertCameraImage
package:flutter_app/utils/cameraImage.util.dart:20
#2      _CameraState.handleStream.<anonymous closure>
package:flutter_app/main.dart:74
#3      _CameraState.handleStream.<anonymous closure>
package:flutter_app/main.dart:66
#4      CameraController.startImageStream.<anonymous closure>
package:camera/src/camera_controller.dart:395
@aronon
Copy link

aronon commented May 19, 2021

me too. I's ok on Android, but failed on Ios at the same error.

@aronon
Copy link

aronon commented May 20, 2021

According to "camera_tutorial/lib/main.dart", "conv" is only used on Android.
So try to comment out like this and it's working.

if (Platform.isAndroid) { conv = convertImageLib .lookup<NativeFunction<convert_func>>('convertImage') .asFunction<Convert>(); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants