Home > front end >  Crop Image library Android
Crop Image library Android

Time:11-18

does some one has already attemted use this https://github.com/CanHub/Android-Image-Cropper library ? could please to send your own github or explain me how to setup. I've setted up but always graddle failing . because I've attempted to setup this library but in gradle syncning time always I'm getting build faild .

please without bulling or hating

Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.CanHub:Android-Image-Cropper:3.3.4.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
       - https://repo.maven.apache.org/maven2/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
       - https://jcenter.bintray.com/com/github/CanHub/Android-Image-Cropper/3.3.4/Android-Image-Cropper-3.3.4.pom
     Required by:
         project :app

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
19 actionable tasks: 18 executed, 1 up-to-date

Because of updating ArctixFox Android Studio allproject {repositories } not exist anymore maven { url 'https://jitpack.io' } whe should I add this

CodePudding user response:

From the error you are getting, it seems like Gradle is unable to resolve CanHub dependency. It could be most probably because you may not have included the jitpack repository in your project's build.gradle (not module's build.gradle).

To add jitpack to the repositories, add maven { url 'https://jitpack.io' } to your project level build.gradle

buildscript {
     repositories {
       ....
       maven { url 'https://jitpack.io' }
     }
  }

Because of updating ArctixFox Android Studio allproject {repositories } not exist anymore

allprojects is still available to use in project-level build.gradle, but now it's not get added by default to the new project, and you would get a GradleScriptException after adding it, as the build is configured to prefer settings.gradle over it.

setting.gradle now includes a dependencyResolutionManagement. If you want to add new repositories using allprojects you have to comment or remove dependencyResolutionManagement, or you can just add your repositories to the repositories block of dependencyResolutionManagement in settings.gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}
  • Related