Trying to upgrade react native 0.75.1, using https://react-native-community.github.io/upgrade-helper.
running into error
Settings file 'mobile/android/settings.gradle' line: 2
* What went wrong:
Plugin [id: 'com.facebook.react.settings'] was not found in any of the following sources:
* Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
* Included Builds (No included builds contain this plugin)
* Plugin Repositories (plugin dependency must include a version number for this source)
here is file android>settings.gradle
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'mobileAppName'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
which is what is required from the react-native upgrade helper. tried commenting out the line and adding the plugin in android/app/build.gradle like so
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: "com.facebook.react.settings"
apply plugin: "com.google.gms.google-services"
apply plugin: "com.google.firebase.crashlytics"
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: "org.jetbrains.kotlin.android"
but the next line errors out
* What went wrong:
A problem occurred evaluating settings 'android'.
> Could not get unknown property 'com' for settings 'android' of type org.gradle.initialization.DefaultSettings.
from line
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
so the plugin has to be imported in settings.gradle
does anyone have a solution or workaround to get the plugin "com.facebook.react.settings") working??