React-native-image-crop-picker: Build error on Android

Created on 31 Jan 2018  ·  6Comments  ·  Source: ivpusic/react-native-image-crop-picker

All post installation steps done (except optional video)
React 16.0
RN 50.4,
RNICP ^0.19.1 - latest from npm

==============

FAILURE: Build failed with an exception.

  • 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:
    amilonga:react-native-image-crop-picker:unspecified

===============

Any suggestions, perhaps?

Most helpful comment

follow readme file, there is section:

Add the following to your build.gradle's repositories section. (project build.gradle)
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

All 6 comments

我也遇到了类似问题
"react": "16.2.0",
"react-native": "0.52.2",

"react-native-image-crop-picker": "^0.19.1"

报的错是:

  • 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:

Test17:react-native-image-crop-picker:unspecified

这是怎么会事? 有没有比较稳定的版本推荐?

follow readme file, there is section:

Add the following to your build.gradle's repositories section. (project build.gradle)
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Was exactly done, you were too hurry to close an issue.
No prob, will use another lib.

something like that ????

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

I have a similar problem

screen shot 2018-01-31 at 14 37 27

@krionoah69 I updated android section in readme. https://github.com/ivpusic/react-native-image-crop-picker#android. So basically android/build.gradle allProjects section should be:

allprojects {
    repositories {
      mavenLocal()
      jcenter()
      maven { url "$rootDir/../node_modules/react-native/android" }

      // jitpack repo is necessary to fetch ucrop dependency
      maven { url "https://jitpack.io" }
    }
}

@ivpusic I made the changes but now there was a bigger problem.
Add as it appears in the documentation (android / build.gradle):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
      mavenLocal()
      jcenter()
      maven { url "$rootDir/../node_modules/react-native/android" }

      // jitpack repo is necessary to fetch ucrop dependency
      maven { url "https://jitpack.io" }
    }
}

Add what refers to (android / app / build.gradle):

    defaultConfig {
        vectorDrawables.useSupportLibrary = true
        applicationId "com.netbeepocket" // <-- This line.
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 2
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

And in the end I throw this error:
screen shot 2018-02-01 at 13 45 33

I have searched several post about the problem but I do not give with the solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

equesteo picture equesteo  ·  3Comments

habovh picture habovh  ·  3Comments

Martian2Lee picture Martian2Lee  ·  3Comments

cwRichardKim picture cwRichardKim  ·  3Comments

althurzard picture althurzard  ·  3Comments