-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Android with RN 0.67.3 crashes when running custom build type with hermes enabled #33177
Comments
|
I did add environment info so I'm not sure what more this bot wants from me 🤔 |
I think I found the issue. It got broken because of this commit: so in order for this to work you need to name your build variants including a word "release". What I tried to do then is this: rename build variant
rename settings to align with the new name:
and
But I still think this is breaking change and probably not the right way to do it. This requires us to change not only name of build variants but also all references to it like CI scripts. |
Thank you so much for reporting this. We had the same issue and we probably never would have found the solution without this report. ❤️ |
You could specify That gives you full control over variant behavior + you don't need to rename it to |
Is this documented somewhere or can you please show an example how to configure staging with adding Release suffix to work in release builds? |
@LadislavBohm i tried your suggestion without success. Could you please take a look below and help me? Im in a dead end.
|
@joaotmachado It's a bit hard to read your gradle file, but I don't see anything wrong when I look at it. Are you getting the same error message as me? Probably post error message too and try to post build.gradle without all those comments so it's easier to read. |
@LadislavBohm i edited my builld.gradle below. And here goes my error:
|
I don't think your problem is related to the same issue I had. The error doesn't even look like you are building staging build type. Are you building it with "./gradlew.bat assembleStagingRelease"? Seems like you built standard assembleRelease version and that crashed with slightly different error. Not sure I can help here. |
@LadislavBohm The error occurs on Debug Mode when executing react-native run-android. |
I get a similar problem when reloading using flipper, the app will crash |
Thanks ! Got it resolved by adding these lines in
as mentioned in #32281 |
This is saver! I wish we can at least have some comments in that build type section so indicate the naming convention |
What exactly should we do to get rid of this error in this release build? Can someone give an example build.gradle? |
It happens with 0.67.4v as well. I think the issue here is that react-native 0.67.4v uses hermes-engine 0.9 instead it should use 0.10. But I'm not sure though. |
This worked for me. Thanks |
Closing as this and other variant-related build issues have been fixed in React Native 0.71 |
Description
When you create new RN project running on 0.67.3 and add a custom build type that inherits from release and launch the app it crashes. Does not crash in debug and does not crash when launching the app in release build type (pre-defined).
Version
0.67.3
Output of
npx react-native info
Steps to reproduce
and enable hermes:
Snack, code example, screenshot, or link to a repository
Crash in Android Studio:
The text was updated successfully, but these errors were encountered: