Plugin [id: 'com.facebook.react.settings'] was not found in any of the following sources
Problem
Summary Starting today, running `expo run:android` my build would very quickly fail with [code block] The relevant line (settings.gradle line 4: `plugins { id("com.facebook.react.settings") }`) was recently added to the `expo-template-bare-minimum` package, which the CLI pulls remotely and therefore cannot be versioned by our app. The new plugin (`com.facebook.react.settings`) was apparently introduced in react-native 0.75.0, and then stubbed in 0.74.4 in order to allow Expo to support both 0.74 and 0.75 with Expo 51 (https://github.com/facebook/react-native/pull/45720) I have fixed the problem by updating from react-native 0.74.3 to 0.74.5 (the current recommended version for Expo 51). What platform(s) does this occur on? Android SDK Version 51 Environment expo-env-info 1.2.0 environment info: System: OS: macOS 14.5 Shell: 5.9 - /bin/zsh Binaries: Node: 18.19.1 - /opt/homebrew/opt/node@18/bin/node npm: 10.2.4 - /opt/homebrew/opt/node@18/bin/npm Managers: CocoaPods: 1.15.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5 Android SDK: API Levels: 31, 33, 33, 34 Build Tools: 30.0.3, 33.0.0, 33.0.1, 33.0.2, 34.0.0 System Images: android-32 | Google APIs ARM 64 v8a, android-34 | Google Play ARM 64 v8a IDEs: Android Studio: 2024.1 AI-241.18034.62.2411.12071903 Xcode: 15.4/15F31d - /usr/bin
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Update React Native Version to Resolve Plugin Not Found Error
The error occurs because the plugin 'com.facebook.react.settings' was introduced in React Native 0.75.0 and is required by the current Expo template. Since the project was using React Native 0.74.3, the plugin was not found, leading to the build failure. Updating to React Native 0.74.5 resolves this issue as it is compatible with Expo SDK 51 and includes the necessary plugin support.
Awaiting Verification
Be the first to verify this fix
- 1
Update React Native Version
Update the React Native version in your project's package.json file to 0.74.5 to ensure compatibility with the Expo SDK and to include the required plugin.
bashnpm install react-native@0.74.5 - 2
Clear Cache
Clear the npm cache to prevent any cached versions from causing issues during the build process.
bashnpm cache clean --force - 3
Reinstall Node Modules
Remove the existing node_modules directory and reinstall the dependencies to ensure all packages are updated correctly.
bashrm -rf node_modules && npm install - 4
Run Android Build
Attempt to run the Android build again to verify that the issue has been resolved.
bashexpo run:android
Validation
Confirm the fix worked by successfully building the Android project without encountering the 'Plugin [id: 'com.facebook.react.settings'] was not found' error. Ensure that the build completes without errors and the application runs as expected on an Android device or emulator.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep