We are currently working with React-Native 0.68.5, Windows 10 and are getting this error when trying to build the gradle file:
Could not resolve all task dependencies for configuration ':classpath'. > Could not find com.facebook.react:react-native-gradle-plugin:.
So far we have tried different versions of com.android.tools.build:gradle, as well as installing 'react-native-gradle-plugin' manually to package.json, also tried deleting the '.gradle' folder and rebuilding it but so far none have worked. Looking for insights from anyone who has faced this issue before and how you were able to resolve it (https://i.sstatic.net/5cKSj.png)
(https://i.sstatic.net/LEqmq.png)
(https://i.sstatic.net/nhPZX.png)
(https://i.sstatic.net/nK4Gl.png)
After you reinstall node_modules with updated package.json to support latest (0.71) react native, you need to edit your settings.gradle file by adding this line:
includeBuild('../node_modules/react-native-gradle-plugin')
Then go to Android folder. And clean the Android folder using ./gradlew clean command and run build, maybe this will help fix your issue.
Simply deleting node_modules and runing npm install works for me
Steps in windows in the root of the project.
rmdir /s node_modules
npm install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With