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

Android App problem, error: no suitable constructor found for DefaultDecoderFactory #411

Open
akira32 opened this issue Aug 26, 2024 · 3 comments

Comments

@akira32
Copy link

akira32 commented Aug 26, 2024

My android app appears one of the error as below when android studio build apk.
error: no suitable constructor found for DefaultDecoderFactory(ArrayList<BarcodeFormat>,<null>,<null>)

I found the error is the constructor of DefaultDecoderFactory. Does someone know how to solve this problem?

mBarcodeView.setDecoderFactory(new DefaultDecoderFactory(formatList, null, null));

            public void run() {
                // Create our Preview view and set it as the content of our activity.
                mBarcodeView = new BarcodeView(cordova.getActivity());

                //Configure the decoder
                ArrayList<BarcodeFormat> formatList = new ArrayList<BarcodeFormat>();
                formatList.add(BarcodeFormat.QR_CODE);
                mBarcodeView.setDecoderFactory(new DefaultDecoderFactory(formatList, null, null));
@akira32
Copy link
Author

akira32 commented Aug 26, 2024

changeme

Thank you. What is it? The file was stopped by my google chrome for secure.

@akira32
Copy link
Author

akira32 commented Aug 26, 2024

I midify the constuctor and remove two null parameters. It seems to be ok. But When I build, the errors(as below)are appears in the Build Output Window. Doe someone know how to solve those errors?

image

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
@akira32 and others