hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
988 stars 386 forks source link

Project fails to compile #273

Closed neokree closed 3 years ago

neokree commented 3 years ago

Hello,

When I try to compile my project on Android it shows this error:

Could not determine the dependencies of task ':app:processDevDebugResources'.
> Could not resolve all task dependencies for configuration ':app:devDebugRuntimeClasspath'.
   > Could not resolve com.github.yalantis:ucrop:2.2.6.
     Required by:
         project :app > project :image_cropper
      > Could not resolve com.github.yalantis:ucrop:2.2.6.
         > Could not get resource 'http://52.28.52.170:8081/artifactory/libs-release-local/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom'.
            > Could not HEAD 'http://52.28.52.170:8081/artifactory/libs-release-local/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom'.
               > Connect to 52.28.52.170:8081 [/52.28.52.170] failed: connect timed out

I'm using image_cropper v1.3.1 in my code. Is there a way to fix this? I think its related to the gradle dependency resolution, but I don't know if there is a way to fix it.

It started showing the error this afternoon, before it compiled just fine. Please help

virgilLeeBJ commented 3 years ago

same problem for me. check your flutter project android build.grade. add this code -> maven { url "https://www.jitpack.io" } fixed

buildscript repositories { google() jcenter() maven { url "https://www.jitpack.io" } }

allprojects: repositories { google() jcenter() maven { url "https://www.jitpack.io" } }

neokree commented 3 years ago

In my case the problem was not about this library at all, it was about an internal maven server repository that stopped working (because the provider had shut it down).

The log was pointing at this library simply because it was the first in my project that was being checked against that repo, and since it wasn't responding, the build was failing for timeout

DimaKutko commented 2 years ago

@neokree

How did you solve this problem, the case above did not help me

neokree commented 2 years ago

I fixed like I said in my previous post, the problem was not in this library, it was caused by one of my project's dependencies that was declaring a not official maven server repository (since it was closed source software). This maven server did stop working unexpectedly, so Gradle when checking for android dependencies wasn't able to found this dependency, causing this error to appear after some time.

If you have a problem similar to this one I suggest you to check out for closed source dependencies that you could have in your project, and either fix the maven server or embed the .aar library that is causing problems in that library.