[Solved] Image-Cropper Gradle issue


I was facing similar problem. But later on I found out that there is one library which is causing that issue.

compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'

Yes. Image Cropping library. When I commented that line and run project after sync, it worked for me.

Now, how to solve that thing? I have found out that some users already posted this issue in Git Link. Please go through below link, it might help you.

https://github.com/ArthurHub/Android-Image-Cropper/issues/495

As Described in that post.

Reason
This is due to the fact that this library includes support libraries with 27.+ version. Support library 27.1.0 was released yesterday and is automatically included in your project with another version defined by yourself. The lib must not define dynamic version!

Solution
You should force all of your support libraries to use the same version.

configurations.all {
    resolutionStrategy {
        eachDependency { details ->
            // Force all of the primary support libraries to use the same version.
            if (details.requested.group == 'com.android.support'
                    && details.requested.name != 'multidex'
                    && details.requested.name != 'multidex-instrumentation') {
                details.useVersion supportLibraryVersion
            }
        }
    }
}

or, You can downgrade library version from 2.6.+ to 2.5.+

compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+'

2

solved Image-Cropper Gradle issue