Also see #892
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
}
repositories {
jcenter()
google()
maven {
url 'https://maven.fabric.io/public'
}
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
distributionUrl = distributionUrl.replace("bin", "all")
}
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
file:/usr/local/share/android-sdk/extras/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
file:/usr/local/share/android-sdk/extras/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
file:/usr/local/share/android-sdk/extras/google/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
file:/usr/local/share/android-sdk/extras/google/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
file:/usr/local/share/android-sdk/extras/android/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
file:/usr/local/share/android-sdk/extras/android/m2repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
file:/Users/dev/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
file:/Users/dev/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
file:/Users/dev/happyin/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
file:/Users/dev/happyin/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :app > project :react-native-image-crop-picker
* 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:
Could not resolve all files for configuration ':react-native-image-crop-picker:debugCompileClasspath'.
> Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :react-native-image-crop-picker
getting the same issue
Same here
@qlerebours
Yes, try to edit node_modules/react-native-image-picker/android/build.gradle and replace buildscript with:
buildscript {
repositories {
google()
jcenter()
}
dependencies { classpath 'com.android.tools.build:gradle:3.1.4' }
}
You should edit classpath 'com.android.tools.build:gradle:3.1.4' according to your main build.gradle
dependencies { classpath 'com.android.tools.build:gradle:3.1.4' }
Yes, indeed it worked (until another installed package break for the same reasons).
Did JCenter remove the old versions of gradle form those repositories ?
A PR is already in progress for the react-native-image-picker repository:
https://github.com/react-native-community/react-native-image-picker/pull/1000
same here, when it gonna fixed?
@DeVoresyah I think it has been fixed when JCenter reuploded the package but it seems that they removed it once more (if you have the issue).
To fix it, this package needs to use the latest version of react-native-image-picker
I too have same error
```error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
- file:/C:/Users/User Name/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Users/User Name/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- file:/C:/Projects/app/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Projects/app/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- file:/C:/Projects/app/node_modules/jsc-android/dist/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Projects/app/node_modules/jsc-android/dist/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :app > project :react-native-image-crop-picker
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
BUILD FAILED in 7s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (C:\Projects\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Projects\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (C:\Projects\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)```
Temporary fix for this is to add this to your build.gradle:
allprojects {
repositories {
...
maven {
// Used by react-native-image-crop-picker for certain dependencies
url("https://jitpack.io")
}
}
}
Getting the same issue. I added the mentioned blocks below and the issue still occurs.
I need a help as soon as possible.
Thank you in advance!!
Most helpful comment
getting the same issue