Skip to content
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 Build Error - Execution failed for task ':react-native-screens:configureCMakeRelWithDebInfo' #2082

Closed
FraserKemp opened this issue Mar 25, 2024 · 20 comments · Fixed by #2088
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@FraserKemp
Copy link

Description

When assembling a dev release build on android I get a build error.

Error shown is :

  • What went wrong:

Execution failed for task ':react-native-screens:configureCMakeRelWithDebInfo'.

[CXX1405] error when building with cmake using /Users/vagrant/git/node_modules/react-native-screens/android/CMakeLists.txt: Build command failed.
Error while executing java process with main class com.google.prefab.cli.AppKt with arguments {--build-system cmake --platform android --abi armeabi-v7a --os-version 24 --stl c++_shared --ndk-version 24 --output /Users/vagrant/git/node_modules/react-native-screens/android/.cxx/RelWithDebInfo/513j6x30/prefab/armeabi-v7a/prefab}

Usage: prefab [OPTIONS] [PACKAGE_PATH]...

Error: Missing argument "PACKAGE_PATH".

Steps to reproduce

  • Create a new project "npx react-native@0.68.7 init RNScreenTest --version 0.68.7"
  • run yarn install
  • Run project via release variant in android studio or via command line
  • See error

ERROR : > Task :react-native-screens:configureCMakeRelWithDebInfo FAILED
C/C++: prefabUsage: prefab [OPTIONS] [PACKAGE_PATH]...
C/C++: prefabError: Missing argument "PACKAGE_PATH".

Snack or a link to a repository

https://github.com/FraserKemp/test-react-native-screens

Screens version

3.30.1

React Native version

0.68.7

Platforms

Android

JavaScript runtime

JSC

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided labels Mar 25, 2024
@hau1412
Copy link

hau1412 commented Mar 26, 2024

I downgrade version [3.29.0], it work

@FraserKemp
Copy link
Author

I also downgraded for now 👍

@tboba
Copy link
Member

tboba commented Mar 26, 2024

Hi @FraserKemp, thanks for submitting this issue! Let me investigate it 🔎

@kumarGautamAramark
Copy link

I am also having same issue -
React native - 0.70.6
react-native-screens - "^3.15.0"

@wieckowskimateusz
Copy link

I am also having same issue - React native - 0.70.6 react-native-screens - "^3.15.0"

instead of "^3.15.0" set "3.29.0" (without ^)

@tboba
Copy link
Member

tboba commented Mar 26, 2024

@kumarGautamAramark This seems to be issue with React Native, rather than error from Screens. I found that there were some issues with prefab already in 0.70 - facebook/react-native#34871

@kumarGautamAramark
Copy link

@wieckowskimateusz yeah, setting "3.29.0" did resolve the issue. Thank you.

@tboba
Copy link
Member

tboba commented Mar 26, 2024

I can confirm this exists on my side 👍 We'll try find a solution for that. Thanks!

@ardneved
Copy link

Confirming downgrading to "3.29.0" instead of "^3.29.0" did resolve the issue.

@frankfuu
Copy link

frankfuu commented Mar 28, 2024

Yep 3.29 works for me. Adding it to my lock file.

@usamaabutt
Copy link

Hi @tboba I am also getting this issue here's the detail of my project.

"react-native": "0.69.12"
"react-native-screens": "^3.29.0",

And I had a patch previously for version 3.29.0 and it was working fine 3 days before the last version release came out 3.30.1.

Patch:
Screenshot 2024-03-28 at 1 18 13 PM

build issue:
Screenshot 2024-03-28 at 1 16 08 PM

Please provide a solution for this.

@usamaabutt
Copy link

I am also having same issue - React native - 0.70.6 react-native-screens - "^3.15.0"

instead of "^3.15.0" set "3.29.0" (without ^)

This fixed my issue, Thanks @wieckowskimateusz for saving my day!

@tboba
Copy link
Member

tboba commented Mar 28, 2024

Hi everyone, thanks for confirming that on your scenario this error also happens! I can observe, that the case with PACKAGE_PATH error happens only on projects with the React Native 0.68. However, the error with ReactAndroidConfig.cmake happens only on projects with the React Native 0.69 - 0.70. I've already discussed this issue with @piaskowyk and we're taking a look on what went wrong 👀

@pradeep-tomer
Copy link

I am also having same issue - React native - 0.70.6 react-native-screens - "^3.15.0"
You have getting same issue in react-native-screen with react-native 0.70.10 then I have update react-native-screen with 3.18.0 then my issue has been resolved

tboba added a commit that referenced this issue Apr 2, 2024
## Description

This PR fixes backward compatibility with React Native versions older
than 0.71. The issue was caused by using prefabs in the screen
transition animation feature. I added a check that makes this feature
available since React Native 0.71

Tested against RN versions:
- [x] 0.68
- [x] 0.69
- [x] 0.70
- [x] 0.71
- [x] 0.73

Fixes
#2082

---------

Co-authored-by: tboba <tymoteusz.boba@gmail.com>
@tboba
Copy link
Member

tboba commented Apr 3, 2024

Hi all! This fix has been included in the newest release of React Native Screens: 3.31.0-rc.0! 🎉
Please note that this is a release candidate for upcoming version of Screens: 3.31.0. If you encounter any issues or inconveniences, please reach out to use by submitting an issue! Thanks 💙

Release notes: https://github.com/software-mansion/react-native-screens/releases/tag/3.31.0-rc.0

cc @FraserKemp @hau1412 @kumarGautamAramark @wieckowskimateusz @ardneved @frankfuu @usamaabutt @pradeep-tomer

@FraserKemp
Copy link
Author

@tboba Awesome thanks for the speedy fix, I will test this is working again next week and let you know if I have issues!!

@zanotta
Copy link

zanotta commented Apr 16, 2024

Using version 3.29.0 works for me.

RN 0.68.2

@bhandanyan-nomad
Copy link

This issue persists for me in v3.31.1 (react-native v0.71.x)

@kmaschke85
Copy link

Same here with 3.31.1. Downgrade to 3.29.0 seems to work for now.

@Gowtham1802
Copy link

Screenshot 2024-06-10 164358

i faced this type of error in android studio, please give me correct solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.