ImagePicker: ucrop url not found
Codes are fine, no any errors shown but when I click on run button this errors were found on log and stopped running further.
Summary
8: Task failed with an exception.
- What went wrong: Execution failed for task ‘:app:mergeDebugNativeLibs’.
Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’. Could not find com.github.yalantis:ucrop:2.2.6-native. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom - https://repo.maven.apache.org/maven2/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom - https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom Required by: project :app Could not find com.github.dhaval2404:imagepicker:2.1. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/dhaval2404/imagepicker/2.1/imagepicker-2.1.pom - https://repo.maven.apache.org/maven2/com/github/dhaval2404/imagepicker/2.1/imagepicker-2.1.pom - https://jcenter.bintray.com/com/github/dhaval2404/imagepicker/2.1/imagepicker-2.1.pom Required by: project :app Could not find com.github.yalantis:ucrop:2.2.6-native. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom - https://repo.maven.apache.org/maven2/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom - https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom Required by: project :app > com.github.dhaval2404:imagepicker-support:1.7.1
Code to reproduce
Used in MainActivity on onCreate Method.
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ImagePicker.with(MainActivity.this)
.createIntent();
}
});
If I exclude Companion then it shows error with with() method. (Cannot resolve method)
Android version
minSdk 21 targetSdk 31
Impacted devices
Installation method
implementation ‘com.github.dhaval2404:imagepicker:2.1’ implementation ‘com.github.dhaval2404:imagepicker-support:1.7.1’
SDK version
compileSdk 31
Other information
Gradle 7.0.2
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.1"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is my gradle.build Project file
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (5 by maintainers)
@vtxmg There seem to be some changes in the project build.gradle when you use
"com.android.tools.build:gradle:7.0.1".Please add
maven { url "https://jitpack.io" }in settings.gradle.Also, Please revert your project build.gradle
@Dhaval2404 Thank you so much it is working now. 😃
@vtxmg For a simple test download the ucrop-2.2.6.aar from the below link. If it fails then there must be some issue with your networks.
https://jitpack.io/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.aar
@vtxmg Configuration looks good to me and I have verified on jitpack the uCrop dependency is available there.
Sometimes network provides download issues. If possible can you please change the network and see if it works or not. or my be apply VPN and give it a try.
Hey @vtxmg
Kindy try by adding UCrop dependency manually
implementation 'com.github.yalantis:ucrop:2.2.6'- lightweight general solutionimplementation 'com.github.yalantis:ucrop:2.2.6-native'- get the power of the native code to preserve image quality (+ about 1.5 MB to an apk size)