urvi joshi
urvi joshi

Reputation: 166

MissingPluginException when trying to open camera in Flutter on ARM64 Ubuntu machine

I am trying to open the camera and fetch live video, similar to a CCTV camera, on an ARM64-based Ubuntu machine using a Flutter application. However, I am encountering the following error when attempting to access the camera:

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method availableCameras on channel plugins.flutter.io/camera) #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7) #1 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:520:35) #2 MethodChannelCamera.availableCameras (package:camera_platform_interface/src/method_channel/method_channel_camera.dart:66:52) #3 main (package:git_camera_example/main.dart:1053:16)

I've tried using the camera package and various other packages and examples. I even attempted the official example to open the camera provided by Flutter: Flutter Camera Example.

The camera installation is fine and works on the machine, but it's not functioning within the Flutter app. If anyone has a solution or guidance, please help!

Note : I tried flutter_webrtc, which supports Linux, but I am still facing the same error.

Upvotes: 0

Views: 126

Answers (2)

sarvanan 2k
sarvanan 2k

Reputation: 11

This is because the Camera package is not suitable for flutter Linux:

Upvotes: 0

gopelkujo
gopelkujo

Reputation: 822

The error mean that camera package is not provide implementation for Linux. From camera package pub.dev information, this package only support platform:

  • iOS
  • Android
  • Web

as stated in this Github Issue, camera on linux platform support is still on development.

But, if you want to experiment with linux camera, after a quick research i found this camera_linux package. I never use it so i don't know if it's work or not. I recommend you to wait for official flutter support.

Upvotes: 0

Related Questions