-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Crashes - On upgrading to Android 14(SDK 34) #41288
Comments
|
I wanted to stick with React Version 0.70.8, as my code runs for both Android and iOS. In my project, 0.70.8 is compatible for both iOS and Android |
Thanks for the issue. Consider that, as soon as we will release 0.73 as stable (ETA: end Nov/start Dec) we are not going to support 0.70 anymore. Hopefully, this gives you some time to plan the migration to the latest version. |
Hi there! 👋 I'm still experiencing the problem, and any guidance or suggestions would be greatly appreciated. If there's any additional information I can provide to help with debugging or if there's a specific way you'd like me to test something, please let me know. Thank you in advance for your time and assistance! |
Have a look at this conversation: reactwg/react-native-releases#84 (comment) We tried to add support for new version of Android in 0.70, but that's not possible unfortunately. |
Hi cipolleschi, here i am using recent version of react-native(72.6) and android target version 34. But i am still facing the same issue. |
Can you provide a reproducer so we can investigate what's going on? |
I upgraded to 0.73 from RN0.72.7 and android sdk 34,encountered an issue where the App Crashes immediately on the launch |
I'm closing this issue as related to React Native 0.70 (which is no longer supported). @zkteco-home please open a new issue |
I'm also facing this now, any update on this? |
Removing |
Hi @zkteco-home @rakeshkumar217 , have you managed to fix this issue? I'm still facing it after patching the |
in my side,working fine |
@zkteco-home which version of RN is your project on? |
when 0.73 just released,I also met same problem,if just change RN version,it is wrong,bcz android folder part files changed,so I suggest that you create new project with RN 0.73,copy your code to new project ,or replace android folder with new android |
@zkteco-home thank you 🙏 |
i have the same issue after i have added kotlin 1.6.0 . after that i ahve removed it but have same issue. |
I had the same issue with my app running on React Native v0.67.4 |
@zahitesh how can we create .aar file without hermes? In my Project, I disabled Hermes build so I cannot run |
@hoangdoanfinx did you get any solution for this? |
@zahitesh |
I had to upgrade to react-native latest version to fix this issue on my side. |
@Kebab `/android` directory is always there, irrespective of any version of
RN you're using
…On Mon, 8 Apr 2024, 08:51 Kebab, ***@***.***> wrote:
@zahitesh <https://github.com/zahitesh>
Your blog post seemed to be very useful but I'm using "react-native":
"0.71.8" and react-native > 71 does not contain /android and we cannot
use that trick :(
—
Reply to this email directly, view it on GitHub
<#41288 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKKCYCAZZNWSA3ZBHUQOQD3Y4IELTAVCNFSM6AAAAAA62MEYG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRG44TCNJZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
yes @marcell6 Then based on the libraries you are using you need to check 2 things.
|
I updated the targetSdkVersion to 34 in my project(MyProject>android>build.gradle). I tested the app functionality on a Pixel 8 device has Android version 14. I did not face any crashes in the app and everything works well. ext { |
I am using react-native 0.62.3, due to some reasons I cannot upgrade my react-native version. After updating my sdk version to 34 and doing changes in mainapplication.java. I am getting error for "Context.RECEIVER_EXPORTED". My MainApplication.java package guru.fan.invimaticconvention; import android.app.Application; import com.bugsnag.BugsnagReactNative; import java.lang.reflect.InvocationTargetException; import guru.fan.invimaticconvention.pdf.PdfViewPackage; public class MainApplication extends Application implements ReactApplication { private static CallbackManager mCallbackManager = CallbackManager.Factory.create(); protected static CallbackManager getCallbackManager() { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
// packages.add(new RNFirebaseNotificationsPackage());
}; @OverRide @OverRide @OverRide /**
My app/build.gradle apply plugin: "com.android.application" repositories { import com.android.build.OutputFile /**
project.ext.react = [ apply from: "$nodeModules/react-native/react.gradle" /**
/**
/**
android {
} android { } crashlytics { dependencies {
} configurations.all { // fixes a Detox dependency // Run this once to be able to run the application with BUCK project.ext.vectoricons = [ apply from: file("$nodeModules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) apply plugin: 'kotlin-android' // this should be last // fixes dependency resolution error Please let me know if any solution. |
error: cannot find symbol Getting above error while running |
error: cannot find symbol Guyz any solution for above issue? My react-native version 0.62.3. And below is my package.json, just in case if I need to update any library. { Please respond if any solution is found, I am trying at my end since last 1 week. |
This also worked on my end! 2019 app and removed by google for depreciated dependencies and a lot to stuffs to upgrade react-native 0.67.5 |
I am having same react-native version still facing same issue. Can you please help @wendysychan ? |
Hi, could you send a screenshot of the error you're encountering? |
|
Like others, I'm using an old version of React Native, which requires SDK target as 33, but we've upgraded Another simple workaround (because Google will reject your submission due SDK being old) is update In my case, this is my
|
solving this problem |
HI, @wendysychan react-native: 0.63.1 Error: cannot find symbol |
This also worked on my end the app won't crash anymore but when i send it for review in google play console it says that
|
I am also facing same issue, reat-native - 0.62.3 |
@christophby there was this import statement missing your comment can you check is this below necessary import and update your comment? It will be easier for resolving this issue.
|
Big thanks to @christophby and everyone for keeping the community alive and helping each other. The solution to put the method below inside
...
Below should be added to the dependencies section of the app/build.gradle file.
|
Thank you, this works for me |
Original solution by christophby; see #41288 (comment) Thank you so much! This works for me with |
thanks it worked |
Thanks, you saved my times |
You can add the following code to your node_modules\react-native\react.gradle file: Install a lib https://www.npmjs.com/package/patch-package and generate a patch of react-native lib. Hope it helps 😉 |
My RN version is 0.70.14 |
"react": "18.2.0", This woks thanks a lot :) |
I also added this line: import android.content.Context; |
Any one still struggling with this issue, I found a workaround. After updating compileSDKVersion & targetSDKVersion to 34. I was getting error for Context.RECEIVER_EXPORTED. After spending more than month, I found in my android->build.gradle, there is block added for supporting some old versions of dependencies I guess, that code block is as below. subprojects { here compileSdkVersion was "28" which was causing issue, after updating it to 34(even 33 works) it worked. And also if anyone using "react-native-orientaion", please follow below link. |
Please note that it may be necessary to add the android.content.Context line to your imports. Also, if your files are in Kotlin, you'd have to convert the java code to kotlin. Check my comment on StackOverflow. https://stackoverflow.com/a/79003676/9883035 |
To anyone still having problems with this, I followed all the steps above and my app was still crashing. I had to update ALL my packages to support Android 14 and then everything worked. Here are some of the packages I had to update:
After updating those packages, the update to Android worked. |
Thanks guys, help a lot of!!!!! |
Description
Currently, my codebase supports Android 13 (SDK version: 33). I wanted to upgrade to SDK 33(Android 14)
On Android 14 updates, the following changes have been made:
kotlinVersion = "1.6.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
My current React Native version is 0.70.8.
However, upon launching the application, I encountered an issue where the App Crashes immediately on the launch. To investigate this, I pulled a Bug Report, which provided the following insights:
React Native Version
0.70.8
Output of
npx react-native info
System:
OS: macOS 14.0
CPU: (8) arm64 Apple M1
Memory: 65.91 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.4.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.8.1 - /opt/homebrew/bin/npm
Watchman: 2023.07.10.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.13.0 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.8 => 0.70.8
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Update Build.gradle's version to support SDK version 34.
Snack, screenshot, or link to a repository
Build.gradle file: https://snack.expo.dev/@shaminisaravanan/android14
The text was updated successfully, but these errors were encountered: