uCrop
uCrop copied to clipboard
Gradle build fail.. Android Gradle v.7.0.1 and Setup is too good
Do you want to request a feature or report a bug? Bug
What is the current behavior? Gradle build failed
What is the expected behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Please attach any image files, URL and stack trace
that can be used to reproduce the bug.
Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop?
Gradle Version - 7.1.1 Android Gradle - 7.0.1
**Error
FAILURE: Build completed with 8 failures.
1: Task failed with an exception.
- What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.github.yalantis:ucrop:2.2.6. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom - https://repo.maven.apache.org/maven2/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom - https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.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.
==============================================================================
2: Task failed with an exception.
- What went wrong: Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.github.yalantis:ucrop:2.2.6. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom - https://repo.maven.apache.org/maven2/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom - https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.6/ucrop-2.2.6.pom Required by: project :app
_________________________________ My Gradle File(Project) ____________________________________
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() maven { url { "https://jitpack.io" } } }
dependencies { classpath "com.android.tools.build:gradle:7.0.1" classpath 'com.google.gms:google-services:4.3.10' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
task clean(type: Delete) { delete rootProject.buildDir }
________________________________________________ Gradle (App) ______________________________________
plugins { id 'com.android.application' }
android { compileSdk 31
defaultConfig {
applicationId "<My Package >"
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.github.yalantis:ucrop:2.2.6' // Crop Image
Other Livery ________________ continued
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
}
same problem, have you solved the probem?
Works after disabling the below-mentioned stuff from settings.gradle!
/dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { google() mavenCentral() jcenter() // Warning: this repository is going to shut down soon } }/
finally I can find the solution, you just move
maven { url "https://jitpack.io" }
from
build.gradle (Project)
to
settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
}
}
rootProject.name = "<Project Name>"
include ':app'
Could not find com.android.tools.build:gradle:7.0.1. Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.0.1/gradle-7.0.1.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.0.1/gradle-7.0.1.pom Required by: project : Add google Maven repository and sync project Open File
hi cant find gradle