bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
574 stars 780 forks source link

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

Open akira32 opened 2 months ago

akira32 commented 2 months ago

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 commented 2 months ago

changeme

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

akira32 commented 2 months ago

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