reactjsreact-nativereact-native-image-picker

React Native Image Picker Is causing the Build failed


Hi This is my first app in react native. I am trying to Use react-native-image-picker. But it is not allowing me to build the app. I am getting the following error

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-image-picker:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':react-native-image-picker:debugCompileClasspath'.
   > Could not resolve androidx.exifinterface:exifinterface:1.3.3.
     Required by:
         project :react-native-image-picker
      > Could not resolve androidx.exifinterface:exifinterface:1.3.3.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.3.3/exifinterface-1.3.3.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.3.3/exifinterface-1.3.3.pom'.

......

BUILD FAILED in 37s
info Run CLI with --verbose flag for more details.

I am Using following version

Android gradle plugin: 7.4.2 Gradle: 8.2.1

I tried cleaning the gradle inside android. I have completed the post installation steps. I tried every solution available on internet as well. Still the build is getting failed. could anyone please help me with this issue


Solution

  • Add mavenCentral() in settings.gradle like this: https://i.sstatic.net/CuHCD.png

    This might work.

    Another solution: implementation "com.android.support:exifinterface:27.1.0"