Skip to content Skip to sidebar Skip to footer

Could Not Resolve Com.facebook.react:react-native:0.32.0

I opened android folder in my react native project in android studio, did all possible modifications to build.gradle files. However I get this repeated error: Error:Failed to res

Solution 1:

It's weird you use a packaged version of react-native from expo... on top of that it seems your package.json point to a version 0.30 ? quite outdated, current RN version is 0.57.2

When in doubt over my build configuration (package.json, build.gradle on android, podfile or workspace/project settings on iOS), I create a dummy react-native project with react-native-cli, and compare the builds files of the project created with mine.

  • Install react-native-cli : npm install -g react-native-cli
  • create some testProject react-native init testProject
  • have a look at package.json, build.gradle, and see the differences with your own files

Then, to fix a build :

  • update the dependencies sections of package.json, grade.build

  • any change to package.json requires a npm install (sometimes with a rm -rf node_modules before, to clean all your node dependencies). Also, make sure any IDE (XCode, Android Studio) that might keep a cached version of files is closed when you type that command

you should definitively replace implementation "com.facebook.react:react-native:0.32.0" with implementation "com.facebook.react:react-native:+"


Post a Comment for "Could Not Resolve Com.facebook.react:react-native:0.32.0"