Я следую этому руководству по интеграции https://reactnative.dev/docs/integratio ... sting-apps, но мне нужно использовать его в фрагменте, поэтому мне нужно было интегрировать это https://reactnative.dev/docs/integratio ... d-fragment
И в какой-то момент я могу запустить приложение, но я получаю это предупреждение
Код: Выделить всё
The app is running using the Legacy Architecture. The Legacy Architecture is deprecated and will be removed in a future version of React Native. Please consider migrating to the New Architecture. For more information, please see https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-hereТехнически, он решает мою проблему со страницами 16 КБ, и я могу использовать ее, но я хочу иметь возможность использовать турбо модули.
Это моя интеграция:
Код: Выделить всё
settings.gradleКод: Выделить всё
pluginManagement {
includeBuild("../node_modules/@react-native/gradle-plugin")
repositories {
gradlePluginPortal()
google()
mavenCentral()
jcenter()
}
}
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
jcenter()
mavenCentral()
}
}
includeBuild("../node_modules/@react-native/gradle-plugin")
rootProject.name = "MobileSDK"
include ':app'. //
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
id 'org.jetbrains.kotlin.plugin.compose'
}
android {
compileSdk 34
namespace 'com.testing.sdk'
ndkVersion '27.1.12297006'
defaultConfig {
applicationId "com.testing.sdk"
minSdk 24
targetSdk 34
versionCode 1
versionName "1.0"
}
...
dependencies {
api project(path: ':my-awesome-sdk') // this is my sdk with RN
...
}
}
Код: Выделить всё
plugins {
id 'com.android.library'
id 'kotlin-kapt'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'com.facebook.react'. //
Подробнее здесь: [url]https://stackoverflow.com/questions/79775749/integration-react-native-as-sdk-with-new-architecture-and-turbo-modules[/url]
Мобильная версия