Closed Brad19 closed 1 month ago
:warning: | Too Old Version of React Native |
---|---|
:information_source: | It looks like your issue or the example you provided uses a Too Old Version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support. |
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Too Old Version of React Native |
---|---|
:information_source: | It looks like your issue or the example you provided uses a Too Old Version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support. |
Please don't close this as i'm looking badly for a solution
0.64.0
You're 10 stables behind our current stable, we can't offer any support. Consider asking on StackOverflow or other forum
I get it. Thanks for your response. But the reason i asked here was, there were issues raised similar to this. Unsure if anyone have answers that I can rely on. For the record we're revamping and started a new project for the same app with 0.73.0. But it is half way through and it takes time to complete. Until then we have to try and maintain the existing project.
Also I found this share in the above article -> https://github.com/facebook/react-native/pull/38256/commits/f14da92d6c082ed21540ef2e1da6622d27a5400c to support target SDK 34. But i can't apply the patch as the RN uses AAR archives as a java dependency.
Also any pointers that if we can't get it before the deadline set by google.
Thanks, BT.
I figured out the solution and found that if we provide Gradle version and Gradle Plugin version as 7.0, it worked. To anyone out there if you bump into the issue for the RN <=0.65.0, this could possibly fix the issue in case you have.
Description
I am using RN version 0.64.0. When I changed targetSdkVersion from 33 to 34 and did the following change, the app is working in debug mode, but crashed in the release mode when i installed in the real device.
ENV: RN: 0.64.0 Node: 16.16.0 Gradle version: 7.4.2 Gradle plugin version: 7.3.0
android/app/build.gradle
// to be added above onCreate() implementation 'org.jetbrains:annotations:16.0.2'
buildscript { ext { androidSvgVersion = '1.2.1' appAuthVersion = '0.7.1' bitmovinCollectorVersion = '2.6.1' bitmovinPlayerVersion = '3.24.2' buildToolsVersion = '31.0.0' excludeAppGlideModule = true glideVersion = '4.11.0' minSdkVersion = 24 compileSdkVersion = 33 targetSdkVersion = 34 timberVersion = '4.5.1' kotlinVersion = '1.6.21' ndkVersion = "20.1.5948944" } repositories { google() mavenCentral() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinVersion}" classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1' classpath 'com.google.gms:google-services:4.3.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
allprojects { repositories { / android build throws minSdk not compatible for androidx.appcompat and it looks like the dependency versions are read from maven and not node_modules. Hence exclusiveContent block is required to ensure that dependency versions are read from node_modules and not from maven. It may not be required when react native version is upgraded to 0.71.0. / exclusiveContent{ filter { includeGroup "com.facebook.react" } forRepository { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" }
}
// TODO: React Native libraries (linked as project modules) with native code need to have a unified
compileSdkVersion
andbuildToolsVersion
. // 3rd party dependencies usually have differing versions used and are not always using the latest ones (a known issue in the RN ecosystem). We work around this by using Gradle'ssubproject
API (refer to the top-level/rootbuild.gradle
file). subprojects { subproject -> afterEvaluate { if (subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library')) { android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion } } } }cd android && ./gradlew ReactAndroid:installArchives It gives below error: FAILURE: Build failed with an exception.
My question here is i'm sure there are apps running versions with RN < 0.65.0. Can anyone tell me what's the problem in the run time and help me to fix this as i'm in a dire need to roll out soon as i've already moved to the other project and I can't account this work if it takes long time.
Steps to reproduce
yarn run-android
React Native Version
0.64.0
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
no
Screenshots and Videos
No response