-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Plugin [id: 'com.facebook.react.settings'] was not found in any of the following sources #46046
Comments
|
|
same issue |
check your @react-native/gradle-plugin resolution in yarn.lock/package-lock.json; if you have any lingering other than 0.75.1 (eg i have 0.74.1 left in there) you have to remove node_modules and regenerate your lock file |
@lovegaoshi is right. Can you confirm you have |
I'll recheck and give you feedback |
Thank you @lovegaoshi & @cortinico issue has been solved |
@cortinico The problem occurred again after reinstalling node_modules. I created a new project using Logs from the newly created app ~/Projects/SomeApp git:[main]
yarn android
info A dev server is already running for this project on port 8081.
info Installing the app...
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/hamoboker/Projects/SomeApp/android/settings.gradle' line: 2
* What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
> Could not read workspace metadata from /Users/hamoboker/.gradle/caches/8.8/kotlin-dsl/accessors/b22002a57a45d84a557a6d199ea7ef01/metadata.bin
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 596ms
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where:
Settings file '/Users/hamoboker/Projects/SomeApp/android/settings.gradle' line: 2 * What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
> Could not read workspace metadata from /Users/hamoboker/.gradle/caches/8.8/kotlin-dsl/accessors/b22002a57a45d84a557a6d199ea7ef01/metadata.bin * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org. BUILD FAILED in 596ms.
info Run CLI with --verbose flag for more details. |
Seems related to: gradle/gradle#28974 I don't have a solution at the moment and I also cannot reproduce: Screen.Recording.2024-08-16.at.11.04.14.movI would have suggested to attempt removing the |
This comment was marked as off-topic.
This comment was marked as off-topic.
/Android/app/build.gradle apply plugin: "com.android.application" /**
/**
/**
android {
signingConfigs { buildTypes { } dependencies {
} apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) |
I tried everything listed above but nothing is working. |
I'm not sure if this will help, but you can also try this
Change it like below
Test environment This got me past the above error, but I got an error on the expo-images side, so I downgraded to bare React Native temporarily. If you don't use the above packages, it should work :( |
@jieey1140 I deleted the gradle many times and rebuild the project then it worked for me. |
This worked for me too! |
I have same issue, no metter what i do, i'm getting same error. Removed /node_modules, .gradle. Tried everything, but the error in Andorid remains. |
I'm getting the same problem along with 1 other error ... React native: 0.76.6
|
Facing same issue |
Facing same issue |
I solved the issue uninstalling the java plugins in VSC, and creating a new project without that plugins |
@El-mou33 Were you able to fix the issue in existing react-native app ? |
I didn't try, my project was really small so it was easy for me restarting the project. Maybe combining other solutions with removing the Java plugins will help. I realised creating a new project in a clean computer that when you install Java plugins on VSC it edits some parts of android graddle folder. |
Facing same issue on expo ~52.0.28 |
Facing same issue FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
|
Getting the same issue
React Native: 0.76.5 What I tried
|
same issue i am facing info Opening app on Android... info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor FAILURE: Build failed with an exception.
BUILD FAILED in 3s |
Do you have any idea what could have caused this all of a sudden, @cortinico? |
Getting this error:
|
I am able to solve this with following steps: Follow these steps to resolve it: Solution Steps
After completing these steps, restart your IDE (Android Studio or VS Code) and try running your project again. This should resolve the issue and allow you to build your React Native app successfully. 🚀 |
./gradlew clean is giving this error |
@bizIshan |
Hi everyone, my team struggled with this issue today, and we managed to solve it in two different ways. I’m not sure if these methods will work for you, but it’s worth a try! Solution 1 (My Case):First, I rebuilt the entire project with the desired version of React Native:
then
Note: Using Then, I ran:
After that, I ran:
This ensures everything is set up correctly (everything should show as checked). Finally, the most important part:
Yes, use npm here, not yarn—I don’t know why, but it worked for me! Solution 2 (For My Friend):For my friend, this approach didn’t work initially, so we had to take some extra steps: Delete the node_modules folder. And run:
Then, run:
This worked for both of us (with a few additional steps on my friend’s machine). Just make sure that react-native doctor shows everything as checked, otherwise you may face this issue again. Good luck, keep coding, and be blessed! 🙏 |
Sir, I am facing an issue in the existing project ( react-native ~0.75.3 and gradle ~8.8 ). Upgrading to the latest version will cause issues with other libraries ( using CLI ) configuration. tried almost all the things mentioned above but didn't get any solution :) |
You can skip 3rd step. Directly install @react-native/gradle-plugin. It should work for you. |
i slove this issue |
This solution worked for me after 2 days :) Using react native cli ~0.75.3 and gradle version 8.8 Steps I did
|
i think you need to update your @react-native/gradle-plugin by |
Worked for me after installing @react-native/gradle-plugin 0.77 and upgrading distributionUrl to gradle-8.9-all.zip in gradle-wrapper.properties. My project is targeting to React Native version 0.75.3 |
I got it resolved quickly, I was also irritated at first I am using Windows 11 go to C:\Users<Username>\.cache\tooling\gradle and delete manually all the cache files any comments and corrections are welcome |
I struggled with the issue for 3 days, approximately around 10 to 12 hours. What worked for me was simply upgrading the react-native version. |
Here is the solutionI was also facing the same problem. My react-native version was 0.75.13. I upgraded it to react-native version 0.77.0 and resolved my issue. Steps:
|
for me issue arrived while starting a new project.. |
Hi everyone, it's been a few weeks, and our team has always struggled with this issue every time we need to install a new dependency. Today, I managed to debug it and solve the problem. I’m not sure if this method will work for everyone, but it’s definitely worth a try! When you build a new project or install a new dependency, before running
Or install the specific dependency you need:
Running After that, you need to upgrade all dependencies with:
Finally, the most important part:
Yes, use Good luck, keep coding, and be blessed! 🙏 |
Description
build fail on android after upgrading from 0.74.5 to 0.75.1 caused by "/android/settings.gradle' line: 2"
i'm using monorepo, i rechecked node_modules path and it is correct
Steps to reproduce
React Native Version
0.75.1
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
...
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: