Still stuck? Try This Discussion here to a Plug and Play Solution to get you started.
So here are the steps to make the migration work for verison 3.3.6 or below.
Follow this guide first 🚨 How to migrate Android Image Cropper 🚨
Then follow the following strps to make it work.
Note: You need to use a single kotlin file and also enable kotlin compiler for your project to make it work.
goto Tools>Kotlin>Configure kotlin in this project and gradle sync the project
Now create a kotlin file GetUri.kt
add following code fun CropImage.ActivityResult?.getUri(): Uri? { return this?.uriContent }
then in main onActivityResult()
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
if (resultCode == RESULT_OK) {
Uri resultUri = GetUriKt.getUri(CropImage.getActivityResult(data));
Log.e(TAG, "onActivityResult: "+resultUri.toString());
}
}
}