GhagSagar23 / livelyness_detection

A single function package to detect weather the face visible in the camera is a live face or not.
MIT License
5 stars 10 forks source link

[camera_android_camerax]: error certain methods don't override or implement methods from a supertype. #16

Open kcibdev opened 2 months ago

kcibdev commented 2 months ago

Describe the bug I can't run my flutter app without it crashing and throwing the error

C:\Users\Nnam0\AppData\Local\Pub\Cache\hosted\pub.dev\camera_android_camerax-0.6.8+2\android\src\main\java\io\flutter\plugins\camerax\PreviewHostApiImpl.java:84: error: cannot find symbol
            new TextureRegistry.SurfaceProducer.Callback() {
                                               ^
  symbol:   class Callback
  location: interface SurfaceProducer
C:\Users\Nnam0\AppData\Local\Pub\Cache\hosted\pub.dev\camera_android_camerax-0.6.8+2\android\src\main\java\io\flutter\plugins\camerax\PreviewHostApiImpl.java:85: error: method does not override or implement a method from a supertype
              @Override
              ^
C:\Users\Nnam0\AppData\Local\Pub\Cache\hosted\pub.dev\camera_android_camerax-0.6.8+2\android\src\main\java\io\flutter\plugins\camerax\PreviewHostApiImpl.java:91: error: method does not override or implement a method from a supertype
              @Override
              ^
3 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':camera_android_camerax:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:

To Reproduce Steps to reproduce the behavior:

  1. Run the command flutter run after adding livelyness_detection: ^0.0.1+4 to pubspec.yaml
  2. See error

Expected behavior App is expected to build and run the app in debug mode

Desktop (please complete the following information):

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.4037], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.6)
    X The current Visual Studio installation is incomplete.
      Please use Visual Studio Installer to complete the installation or reinstall Visual Studio.
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.92.2)
[√] Connected device (5 available)
[√] Network resources

Additional context minSdkVersion 23

FishMooneyL commented 2 months ago

Just downgrade your camera plugin to 0.10.6, camera: 0.10.6

GhagSagar23 commented 1 month ago

@kcibdev, can you please share the pubspec.yaml file of your project? I would like to see which are the other packages used in the project.