react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

Android Build Error - Execution failed for task ':react-native-screens:configureCMakeRelWithDebInfo'

Open FraserKemp opened this issue 10 months ago • 1 comments

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 [email protected] 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

FraserKemp avatar Mar 25 '24 22:03 FraserKemp

I downgrade version [3.29.0], it work

hau1412 avatar Mar 26 '24 02:03 hau1412

I also downgraded for now 👍

FraserKemp avatar Mar 26 '24 09:03 FraserKemp

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

tboba avatar Mar 26 '24 10:03 tboba

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

kumarGautamAramark avatar Mar 26 '24 11:03 kumarGautamAramark

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 ^)

wieckowskimateusz avatar Mar 26 '24 13:03 wieckowskimateusz

@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 - https://github.com/facebook/react-native/issues/34871

tboba avatar Mar 26 '24 13:03 tboba

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

kumarGautamAramark avatar Mar 26 '24 13:03 kumarGautamAramark

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

tboba avatar Mar 26 '24 13:03 tboba

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

ardneved avatar Mar 26 '24 16:03 ardneved

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

frankfuu avatar Mar 28 '24 01:03 frankfuu

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 avatar Mar 28 '24 08:03 usamaabutt

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!

usamaabutt avatar Mar 28 '24 10:03 usamaabutt

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 👀

tboba avatar Mar 28 '24 15:03 tboba

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

pradeep-tomer avatar Mar 31 '24 08:03 pradeep-tomer

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

tboba avatar Apr 03 '24 17:04 tboba

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

FraserKemp avatar Apr 12 '24 20:04 FraserKemp

Using version 3.29.0 works for me.

RN 0.68.2

zanotta avatar Apr 16 '24 12:04 zanotta

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

bhandanyan-nomad avatar May 01 '24 12:05 bhandanyan-nomad