Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28460

I can't build android app with react-native-image-crop-picker

$
0
0

I want to add multiple image upload feature so I installed react-native-image-crop-picker library to my project and i made the steps in readme which is here README

But when i try to build project

react-native run-android

i get error.

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/mmtbo/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
       - file:/C:/Users/mmtbo/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
       - file:/C:/Users/mmtbo/workspace/imagePickertest/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
       - file:/C:/Users/mmtbo/workspace/imagePickertest/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
       - file:/C:/Users/mmtbo/workspace/imagePickertest/node_modules/jsc-android/dist/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
       - file:/C:/Users/mmtbo/workspace/imagePickertest/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

i couldn't find much thing about this error.

this is from android/build.gradle

    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 16
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    repositories {
        google()
        mavenLocal()
        jcenter()
        maven { url "$rootDir/../node_modules/react-native/android" }

        // ADD THIS
        maven { url 'https://maven.google.com' }

        // ADD THIS
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.4.1")

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

android/app/build.gradle

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.imagepickertest"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
    }

Viewing all articles
Browse latest Browse all 28460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>