Skip to content

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

@akira32

Description

@akira32

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));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions