Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find com.github.yalantis:ucrop:2.2.1-native #539

Closed
sandropoluan opened this issue Dec 9, 2017 · 11 comments

Comments

@sandropoluan
Copy link

commented Dec 9, 2017

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.19.0
  • react-native 0.48.4

Platform

Tell us to which platform this issue is related

  • Android
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-image-crop-picker'.
      > Could not resolve all dependencies for configuration ':react-native-image-crop-picker:_debugPublishCopy'.
         > Could not find com.github.yalantis:ucrop:2.2.1-native.
           Required by:
               AuraiId:react-native-image-crop-picker:unspecified

My build.gradle
build gradle

@ivpusic

This comment has been minimized.

Copy link
Owner

commented Dec 9, 2017

check readme. you are missing maven repo

@ivpusic ivpusic closed this Dec 9, 2017
@jandom

This comment has been minimized.

Copy link

commented Dec 11, 2017

@ivpusic in the screenshot sent in the original report, the maven repo is added to the repositiories {} (and it looks just like you want it to look in your readme.md file)

How else can this repo be added? I'm seeing the same issue building on mobile center

@ivpusic

This comment has been minimized.

Copy link
Owner

commented Dec 11, 2017

it should be added to project build.gradle not to app build.gradle

@jandom

This comment has been minimized.

Copy link

commented Dec 11, 2017

Yup, that worked, thank you! – sorry didn't notice the app vs project aspect

@coreh

This comment has been minimized.

Copy link

commented Dec 13, 2017

Just for future reference for anyone who, like me, is also hitting this issue after searching for the error message:

The proper way to specify multiple Maven repositories (if you already have one) is, as per this stack overflow question, like this:

allprojects {
    repositories {
        // Important: You must use separate `maven {}` entries
        maven { url "https://jitpack.io" }
        maven { url "$rootDir/../node_modules/react-native/android" }
    }
}

I was trying to add them like this:

allprojects {
    repositories {
        // Wrong! You should not put two URL entries within the same `maven {}` entry.
        maven {
            url "https://jitpack.io"
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

That does not work.

@itinance

This comment has been minimized.

Copy link
Contributor

commented Dec 18, 2017

Many thanks @coreh !!!!

@mayurkothule

This comment has been minimized.

Copy link

commented Jan 25, 2018

Also check that you have below dependencies added @

android/app/build.gradle file

dependencies {
 compile project(':react-native-image-crop-picker') // add this line
}

in my case it was not get added on running react-native link react-native-image-crop-picker.

@peterchibunna

This comment has been minimized.

Copy link

commented Apr 5, 2018

@mayurkothule running react-native link react-native-image-crop-picker would have added that automatically.

@hdornier-reeliant

This comment has been minimized.

Copy link

commented Aug 20, 2018

Hello,
for me It was adding in the settings.gradle :

include ':react-native-image-crop-picker'
project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android')

@valerybodak

This comment has been minimized.

Copy link

commented Sep 24, 2018

My deps from package.json:
"react-native-image-crop-picker": "0.21.2",
"react": "16.5.0",
"react-native": "0.57.0",

I solved it by adding maven { url "https://jitpack.io" } to android/build.gradle. It works for me

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}
@abbasmoosavi

This comment has been minimized.

Copy link

commented May 31, 2019

@valerybodak very good answer and solved my problem. saved my time , thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.