2

I'm build my project after added react-native-image-crop-picker. But i meet this error. enter image description here Could you please to show me the way to fix this. Thank you very much.

//build.gradle
buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "20.1.5948944"
    }
    repositories {
        
        mavenCentral()
        google()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.1")
    }
}

allprojects {
    repositories {
        mavenCentral()
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        maven { url 'https://maven.google.com' }
        maven { url 'https://www.jitpack.io' }
    }
}
Chen Triều
  • 79
  • 2
  • 6
  • jcenter message is not the error message, it's just a warning saying you should consider removing jcenter and use maven. The error message you're looking for comes after `* What went wrong:`. And in your case this answer should fix your problem: [NDK at ~/Library/Android/sdk/ndk-bundle did not have a source.properties file](https://stackoverflow.com/questions/64372383/ndk-at-library-android-sdk-ndk-bundle-did-not-have-a-source-properties-file) – Ugur Eren Nov 22 '21 at 05:07
  • Here is a useful link that will provide an alternative solution for addressing this issue. https://blog.gradle.org/jcenter-shutdown – Tatarao Vana Nov 22 '21 at 06:05

3 Answers3

0

try this to migrate from jCenter to mavenCentral

enter image description here

user1462498
  • 354
  • 1
  • 4
  • 10
0

Solutions

  • Migrate your dependency libraries from jcenter to mavenCentral (Find 'jcenter()' and replace it with 'mavenCentral()') raise a pull request (Do this in your free time).
  • For quick workaround apply changes to the libraries in your node_modules folder and use 'patch-package' library to save and apply changes.
Vetri vendhan
  • 51
  • 1
  • 4
0

i found the solution and it's work for me

remove yarn.lock , nodeModules , podlockfile , and then yarn install.

thank me latter :)

maharsh
  • 39
  • 1
  • 1
  • 3