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

error: cannot find symbol mCameraView.setPreferredImplementationMode(PreviewView.ImplementationMode.TEXTURE_VIEW); #12

Open
violuke opened this issue Sep 21, 2022 · 1 comment

Comments

@violuke
Copy link

violuke commented Sep 21, 2022

I'm getting this error when trying to build my app with this plugin. Can you please help?

> Task :app:compileReleaseJavaWithJavac FAILED
/workspace/build/cordova/platforms/android/app/src/main/java/com/mobisys/cordova/plugins/mlkit/barcode/scanner/CaptureActivity.java:260: error: cannot find symbol
    mCameraView.setPreferredImplementationMode(PreviewView.ImplementationMode.TEXTURE_VIEW);
                                                                             ^
  symbol:   variable TEXTURE_VIEW
  location: class ImplementationMode
/workspace/build/cordova/platforms/android/app/src/main/java/com/mobisys/cordova/plugins/mlkit/barcode/scanner/CaptureActivity.java:306: error: cannot find symbol
    preview.setSurfaceProvider(mCameraView.createSurfaceProvider());
                                          ^
  symbol:   method createSurfaceProvider()
  location: variable mCameraView of type PreviewView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /workspace/build/cordova/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
@JohnOhl
Copy link

JohnOhl commented Sep 21, 2022

You may need to check to ensure the cordova-plugin-androidx-adapter package is also installed, and if you're using cordova-android < 9.0.0 the cordova-plugin-androidx package needs to be installed as well.

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

No branches or pull requests

2 participants