can not be applied to given types

1

Good day! I have an error in code in which before I did not mark it. This is my mistake:

Error:(1012, 9) error: constructor Crop in class Crop cannot be applied to given types;
required: Uri,Uri
found: Uri
reason: actual and formal argument lists differ in length

This is the method that marks me the error in new Crop .

 private void beginCrop(Uri source) {
        // Uri outputUri = Uri.fromFile(new File(registerActivity.getCacheDir(),
        // "cropped"));
        Uri outputUri = Uri.fromFile(new File(Environment
                .getExternalStorageDirectory(), (Calendar.getInstance()
                .getTimeInMillis() + ".jpg")));
        new Crop(source).output(outputUri).asSquare().start(activity);
    }

I hope you give me an idea of how to solve it. Gracis.

    
asked by Ulises Díaz 20.11.2017 в 19:31
source

1 answer

1

Ok, apparently you were using an outdated version, as I see the documentation, the way to call the crop is as follows:

Crop.of(inputUri, outputUri).asSquare().start(activity)

In your case it would look like this:

Crop.of(source,outputUri).asSquare().start(activity);
    
answered by 20.11.2017 / 20:34
source