Код: Выделить всё
buildscript {
ext {
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0'
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '26')
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35')
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '35')
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'
frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0'
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.4.2')
classpath('com.facebook.react:react-native-gradle-plugin')
classpath 'com.google.gms:google-services:4.4.0'
}
}
allprojects {
repositories {
maven {
url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
}
maven {
url(new File(['node', '--print', "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), '../dist'))
}
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
< /code>
app -> build.gradle < /p>
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'xxx.xxxx.xxx'
defaultConfig {
applicationId 'xxx.xxxx.xxx'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 26
versionName "2.5"
missingDimensionStrategy 'store', 'play'
buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
< /code>
вот мой пакет. Json < /p>
"dependencies": {
"@amplitude/analytics-react-native": "^1.4.5",
"@expo/webpack-config": "^19.0.0",
"@firebase/auth": "^1.5.0",
"@gorhom/bottom-sheet": "^4.6.3",
"@gorhom/portal": "^1.0.14",
"@invertase/react-native-apple-authentication": "^2.3.0",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-clipboard/clipboard": "^1.14.1",
"@react-native-community/datetimepicker": "7.2.0",
"@react-native-community/netinfo": "9.3.10",
"@react-native-firebase/analytics": "18.7.1",
"@react-native-firebase/app": "^18.7.1",
"@react-native-firebase/auth": "^18.7.1",
"@react-native-firebase/messaging": "^18.7.3",
"@react-native-google-signin/google-signin": "^10.1.1",
"@react-native-picker/picker": "2.4.10",
"@react-native/metro-config": "^0.73.2",
"@react-navigation/bottom-tabs": "^6.5.9",
"@react-navigation/material-bottom-tabs": "^6.2.17",
"@react-navigation/material-top-tabs": "^6.6.4",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@react-navigation/stack": "^6.3.17",
"@reduxjs/toolkit": "^1.9.2",
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"@stripe/stripe-react-native": "^0.38.6",
"appcenter": "^5.0.0",
"appcenter-analytics": "^5.0.0",
"appcenter-crashes": "^5.0.0",
"axios": "^1.5.1",
"date-fns": "^3.0.6",
"dicebear": "^9.0.1",
"expo": "^49.0.21",
"expo-font": "~11.4.0",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"lodash": "^4.17.21",
"markdown-it": "^14.1.0",
"marked": "^13.0.2",
"marked-it-core": "^2.4.2",
"moment": "^2.30.1",
"node-sass": "^9.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.4",
"react-native-code-push": "^8.1.1",
"react-native-config": "^1.5.3",
"react-native-dotenv": "^3.4.11",
"react-native-drawer-layout": "^4.0.0-alpha.1",
"react-native-element-dropdown": "^2.10.2",
"react-native-gesture-handler": "^2.13.4",
"react-native-gifted-charts": "^1.4.23",
"react-native-htmlview": "^0.17.0",
"react-native-iap": "^12.15.7",
"react-native-linear-gradient": "^2.8.3",
"react-native-markdown-display": "^7.0.2",
"react-native-modal": "^13.0.1",
"react-native-modal-datetime-picker": "^18.0.0",
"react-native-pager-view": "6.2.0",
"react-native-paper": "^5.10.6",
"react-native-pell-rich-editor": "^1.9.0",
"react-native-permissions": "^4.0.4",
"react-native-picker-select": "^8.1.0",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^3.5.4",
"react-native-render-html": "^6.3.4",
"react-native-safe-area-context": "4.6.3",
"react-native-sass-transformer": "^2.0.0",
"react-native-screens": "~3.22.0",
"react-native-snackbar": "^2.6.2",
"react-native-svg": "^13.13.0",
"react-native-svg-transformer": "^1.1.0",
"react-native-svg-uri": "^1.2.3",
"react-native-tab-view": "^3.5.2",
"react-native-toast-message": "^2.2.0",
"react-native-vector-icons": "^10.2.0",
"react-native-video": "^6.10.1",
"react-native-video-controls": "^2.8.1",
"react-native-web": "~0.19.6",
"react-native-webview": "^13.6.3",
"react-redux": "^9.1.2",
"tldts": "^6.1.71"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"sass": "^1.68.0"
},
< /code>
Я использую
[b] react-cnitals: 0.72.4 < /strong> и
функциональный >экспо: ^49.0.21[/b]
Я попытался добавить следующее в моем Mainapplication.java < /p>
.@Override
public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) {
if (Build.VERSION.SDK_INT >= 34 && getApplicationInfo().targetSdkVersion >= 34) {
return super.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED);
} else {
return super.registerReceiver(receiver, filter);
}
}
трасса стека, когда приложение получает сбою:
фатальный исключение: main
at com.swmansion.rnscreens.screenstack.obtaindrawingop (screenstack.kt: 312)
at at at at at at at at at at at at com.swmansion.rnscreens.screenstack.drawchild (screenstack.kt: 296)
at android.view.viewgroup.dispatchdraw (viewgroup.java:4317)
at com.swmansion.rnscreens.spreenstack.dispatchdraw (screen.kt.kt.kt. android.view.view.updatedisplaylistifdirty (view.java:22747)
at android.view.viewgroup.reecreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:45131313131313131313131313131313131313131 android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> android.view.view.updatedisplaylistifdirty (view.java:22712)
at android.view.viewgroup.recreatechilddisplaylist (viewgroup.java:4540)
at android.view.viewgroup.dispatchgetdisplaylild (viewgroup.java:451313131313131313131313131 31>> Android.view.view.updatedIsplylistifdirty (view.java:22712)
at android.view.threadedrender /> at android.view.threadedrenderer.draw (thinkedRenderer.java:798)
at android.view.viewrootimpl.draw (viewrootimpl.java:4939)
at android.view.viewrotimpl.performdraw (viewroot.java android.view.viewrootimpl.performtraversals (viewrootimpl.java:3822)
at android.view.viewrootimpl.dotraversal (viewrootimpl.java:2465)
Android.View.ViewRootimpl $ traversalRunnable.run (viewrootimpl.java:9305)
at android.view.choreograper $ callbackrecord.run (choreographer.java:1339)
at android.view.choregrographer. /> at android.view.choreographer.docallbacks (choreographer.java:952)
at android.view.choreographer.doframe (хореограф. Android.os.handler.handlecallback (handler.java:958)
at android.os.handler.dispatchmessage (handler.java:99)
at android.os.looper.looponce (looper.java:205)
atroid.os.looper.lool. Android.App.ActivityThread.Main (ActivityThread.java:8177)
Подробнее здесь: https://stackoverflow.com/questions/797 ... i-level-35
Мобильная версия