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

Android Build Issue with New Architecture

Open rnkdsh opened this issue 1 year ago • 26 comments

Description

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]'.
> [CXX1405] error when building with cmake using /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
482 actionable tasks: 477 executed, 5 up-to-date
  Error while executing process /usr/local/lib/android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/usr/local/lib/android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/usr/local/lib/android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/usr/local/lib/android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/usr/local/lib/android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/w47432nr/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/w47432nr/obj/arm64-v8a -DCMAKE_BUILD_TYPE=RelWithDebInfo -B/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/w47432nr/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DNATIVE_DEBUG=false -DREACT_NATIVE_TARGET_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=Trademanza-ReactNative -DRNVERSION=70}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/local/lib/android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /home/runner/work/Trademanza-ReactNative/Trademanza-ReactNative/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org/

BUILD FAILED in 5m 46s

Steps to reproduce

  1. Install cmake using $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.18.1"
  2. Generate APK using ./gradlew assembleRelease

Snack or a link to a repository

https://github.com/software-mansion/react-native-reanimated

Reanimated version

3.0.0-rc.2

React Native version

0.70.1

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

No response

Device model

No response

Acknowledgements

Yes

rnkdsh avatar Sep 21 '22 16:09 rnkdsh

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar Sep 21 '22 16:09 github-actions[bot]

@rnkdsh please post your android/build.gradle & android/app/build.gradle

ericvandevprod avatar Sep 21 '22 22:09 ericvandevprod

Hey @rnkdsh, thanks for submitting this issue. Does it fail if you run ./gradlew assembleRelease again?

tomekzaw avatar Sep 27 '22 07:09 tomekzaw

I have the same issue. RN 0.70.1 Reanimated 3.0.0-rc.2 -rc.3

FAILURE: Build completed with 5 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:configureBuildForHermes'.
> A problem occurred starting process 'command 'cmake''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/liu/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/liu/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/liu/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -B/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/.cxx/Debug/3r534y5y/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/Users/liu/Desktop/vyltcapp/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/liu/Desktop/vyltcapp/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=vyltcapp -DHERMES_ENABLE_DEBUGGER=1}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  HERMES_EXECUTOR_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[armeabi-v7a]'.
> [CXX1405] error when building with cmake using /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/liu/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=armeabi-v7a -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/liu/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/liu/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/armeabi-v7a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -B/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/.cxx/Debug/3r534y5y/armeabi-v7a -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/Users/liu/Desktop/vyltcapp/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/liu/Desktop/vyltcapp/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=vyltcapp -DHERMES_ENABLE_DEBUGGER=1}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  HERMES_EXECUTOR_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[x86]'.
> [CXX1405] error when building with cmake using /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/liu/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=x86 -DCMAKE_ANDROID_ARCH_ABI=x86 -DANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/liu/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/liu/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/x86 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/x86 -DCMAKE_BUILD_TYPE=Debug -B/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/.cxx/Debug/3r534y5y/x86 -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/Users/liu/Desktop/vyltcapp/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/liu/Desktop/vyltcapp/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=vyltcapp -DHERMES_ENABLE_DEBUGGER=1}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  HERMES_EXECUTOR_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[x86_64]'.
> [CXX1405] error when building with cmake using /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/liu/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=x86_64 -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/liu/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/liu/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/liu/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/x86_64 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/3r534y5y/obj/x86_64 -DCMAKE_BUILD_TYPE=Debug -B/Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android/.cxx/Debug/3r534y5y/x86_64 -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/Users/liu/Desktop/vyltcapp/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/liu/Desktop/vyltcapp/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=vyltcapp -DHERMES_ENABLE_DEBUGGER=1}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/liu/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  HERMES_EXECUTOR_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /Users/liu/Desktop/vyltcapp/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 18s
379 actionable tasks: 374 executed, 5 up-to-date

app/buid.gradle

apply plugin: "com.android.application"

import com.android.build.OutputFile
import org.apache.tools.ant.taskdefs.condition.Os

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation. If none specified and
 *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
 *   // default. Can be overridden with ENTRY_FILE environment variable.
 *   entryFile: "index.android.js",
 *
 *   // https://reactnative.dev/docs/performance#enable-the-ram-format
 *   bundleCommand: "ram-bundle",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

/**
 * The preferred build flavor of JavaScriptCore.
 *
 * For example, to use the international variant, you can use:
 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
 *
 * The international variant includes ICU i18n library and necessary data
 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
 * give correct results when using with locales other than en-US.  Note that
 * this variant is about 6MiB larger per architecture than default.
 */
def jscFlavor = 'org.webkit:android-jsc:+'

/**
 * Whether to enable the Hermes VM.
 *
 * This should be set on project.ext.react and that value will be read here. If it is not set
 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
 * and the benefits of using Hermes will therefore be sharply reduced.
 */
def enableHermes = project.ext.react.get("enableHermes", false);

/**
 * Architectures to build native code for.
 */
def reactNativeArchitectures() {
    def value = project.getProperties().get("reactNativeArchitectures")
    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
    ndkVersion rootProject.ext.ndkVersion

    compileSdkVersion rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "com.vyltcapp"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0.0"
        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
        ndk { abiFilters "armeabi-v7a", 'x86', "arm64-v8a", "x86_64"}//, 'x86', "arm64-v8a", "x86_64"
        if (isNewArchitectureEnabled()) {
            // We configure the CMake build only if you decide to opt-in for the New Architecture.
            externalNativeBuild {
                cmake {
                    arguments "-DPROJECT_BUILD_DIR=$buildDir",
                        "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
                        "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
                        "-DNODE_MODULES_DIR=$rootDir/../node_modules",
                        "-DANDROID_STL=c++_shared"
                }
            }
            if (!enableSeparateBuildPerCPUArchitecture) {
                ndk {
                    abiFilters (*reactNativeArchitectures())
                }
            }
        }
    }

    if (isNewArchitectureEnabled()) {
        // We configure the NDK build only if you decide to opt-in for the New Architecture.
        externalNativeBuild {
            cmake {
                path "$projectDir/src/main/jni/CMakeLists.txt"
            }
        }
        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
            into("$buildDir/react-ndk/exported")
        }
        afterEvaluate {
            // If you wish to add a custom TurboModule or component locally,
            // you should uncomment this line.
            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)

            // Due to a bug inside AGP, we have to explicitly set a dependency
            // between configureCMakeDebug* tasks and the preBuild tasks.
            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
            configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
            configureCMakeDebug.dependsOn(preDebugBuild)
            reactNativeArchitectures().each { architecture ->
                tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
                    dependsOn("preDebugBuild")
                }
                tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
                    dependsOn("preReleaseBuild")
                }
            }
        }
    }

    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include (*reactNativeArchitectures())
        }
    }
    signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://reactnative.dev/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
            }

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }
}

if (isNewArchitectureEnabled()) {
    // If new architecture is enabled, we let you build RN from source
    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
    // This will be applied to all the imported transtitive dependency.
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute(module("com.facebook.react:react-native"))
                    .using(project(":ReactAndroid"))
                    .because("On New Architecture we're building React Native from source")
            substitute(module("com.facebook.react:hermes-engine"))
                    .using(project(":ReactAndroid:hermes-engine"))
                    .because("On New Architecture we're building Hermes from source")
        }
    }
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.implementation
    into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
//applyNativeModulesAppBuildGradle(project)
//apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
def isNewArchitectureEnabled() {
    // To opt-in for the New Architecture, you can either:
    // - Set `newArchEnabled` to true inside the `gradle.properties` file
    // - Invoke gradle with `-newArchEnabled=true`
    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

new project build.gradle

JonsonHI avatar Sep 27 '22 09:09 JonsonHI

Same issue: RN 0.70.1, RNR v2.10.0 and v3.0.0-rc.2 & rc.3

As a side note I have a mobile app sitting in a monorepo by nrwl like my-project/apps/test-app, paths below are edited for simplicity

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] error when building with cmake using ~/test-app/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process ~/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H~/test-app/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=~/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=~/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=~/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=~/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=~/test-app/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/5f4l1h1x/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=~/test-app/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/5f4l1h1x/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -B~/test-app/node_modules/react-native-reanimated/android/.cxx/Debug/5f4l1h1x/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DNATIVE_DEBUG=false -DREACT_NATIVE_TARGET_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=~/test-app/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=~/test-app/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=test-app -DRNVERSION=70}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: ~/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: ~/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory ~/test-app/node_modules/react-native-reanimated/android
  
  CMake Error at CMakeLists.txt:74 (add_library):
    Cannot find source file:
  
      ~/test-app/node_modules/react-native-reanimated/Common/cpp/Fabric/FabricUtils.cpp
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
    .hpp .hxx .in .txx
  
  
  CMake Error at CMakeLists.txt:74 (add_library):
    No SOURCES given to target: reanimated
  
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

It appears that node_modules/react-native-reanimated/Common/cpp/Fabric does not exist as a folder

Android gradle plugin: 7.2.1 Gradle: 7.5.1

jahglow avatar Sep 27 '22 15:09 jahglow

The same as above when ./gradlew assembleRelease react-native: 0.70.1, react-native-reanimated: 3.0.0-rc.3

> Task :react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a] FAILED
C/C++: release|arm64-v8a :CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
C/C++: release|arm64-v8a :Please set them or make sure they are set and tested correctly in the CMake files:
C/C++: release|arm64-v8a :FABRICJNI
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :FBJNI_LIB
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :FOLLY_LIB
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :GLOG_LIB
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :JSI_LIB
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_DEBUG
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_NATIVE_JNI_LIB
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_COMPONENTREGISTRY
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_CORE
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_DEBUG
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_MOUNTING
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_SCHEDULER
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :REACT_RENDER_UIMANAGER
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :RRC_ROOT
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :RRC_VIEW
C/C++: release|arm64-v8a :    linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
C/C++: release|arm64-v8a :CMake Generate step failed.  Build files cannot be regenerated correctly.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]'.
> [CXX1405] error when building with cmake using /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
  Error while executing process /Users/username/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=21 -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/username/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/username/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/username/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/username/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/5l244i3y/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/5l244i3y/obj/arm64-v8a -DCMAKE_BUILD_TYPE=RelWithDebInfo -B/Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/5l244i3y/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=70 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_76_0 -DNODE_MODULES_DIR=/Users/username/rn-monorepo/apps/test-app/node_modules -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/username/rn-monorepo/apps/test-app/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=true -DPLAYGROUND_APP_NAME=test-app -DHERMES_ENABLE_DEBUGGER=0}
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Users/username/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Users/username/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  FABRICJNI
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  FBJNI_LIB
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  FOLLY_LIB
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  GLOG_LIB
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  JSI_LIB
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_DEBUG
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_NATIVE_JNI_LIB
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_COMPONENTREGISTRY
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_CORE
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_DEBUG
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_MOUNTING
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_SCHEDULER
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  REACT_RENDER_UIMANAGER
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  RRC_ROOT
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  RRC_VIEW
      linked by target "reanimated" in directory /Users/username/rn-monorepo/apps/test-app/node_modules/react-native-reanimated/android
  
  CMake Generate step failed.  Build files cannot be regenerated correctly.


==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

==============================================================================

jahglow avatar Sep 28 '22 08:09 jahglow

Same issue

sonipranjal avatar Oct 01 '22 22:10 sonipranjal

still waiting for a fix.

SectionTN avatar Oct 04 '22 10:10 SectionTN

Me too

jahglow avatar Oct 12 '22 09:10 jahglow

I am having the same issue, with the new arch enabled + v8, on the below combinations:

  • RN 0.69.4 + Reanimated 3.0.0-rc.3
  • RN 0.69.4 + Reanimated 2.10.0
  • RN 0.70.3 + Reanimated 2.10.0

capezzbr avatar Oct 14 '22 00:10 capezzbr

Hey @tomekzaw, it does seem that CMakeLists.txt is referencing "${COMMON_SRC_DIR}/cpp/Fabric that doesn't exist under node_modules/react-native-reanimated. Here is the content of node_modules/react-native-reanimated/Common/cpp for me:

AnimatedSensor		LayoutAnimations	NativeModules		Registries		SharedItems		Tools			headers			hidden_headers

is there any way that you could push out a patch for reanimated 2.10.x with the missing files? 👍

capezzbr avatar Oct 14 '22 02:10 capezzbr

Hey @capezzbr , we just published 2.11.0, could you please check if it works for you? I've personally checked that building from source on Android works with RN 0.65, 0.68 and 0.70.

tomekzaw avatar Oct 14 '22 06:10 tomekzaw

Hey @tomekzaw , tested 2.11.0 with RN 0.69.4 and V8 (so building from source) and I am getting this failure on Android for the new arch

> Task :react-native-reanimated:configureCMakeDebug[arm64-v8a] FAILED
  | C/C++: debug\|arm64-v8a :CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  | C/C++: debug\|arm64-v8a :Please set them or make sure they are set and tested correctly in the CMake files:
  | C/C++: debug\|arm64-v8a :FABRICJNI
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :FBJNI_LIB
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :FOLLY_LIB
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :GLOG_LIB
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :JSI_LIB
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_DEBUG
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_NATIVE_JNI_LIB
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_COMPONENTREGISTRY
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_CORE
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_DEBUG
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_MOUNTING
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_SCHEDULER
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :REACT_RENDER_UIMANAGER
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :RRC_ROOT
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :RRC_VIEW
  | C/C++: debug\|arm64-v8a :    linked by target "reanimated" in directory /workdir/node_modules/react-native-reanimated/android
  | C/C++: debug\|arm64-v8a :CMake Generate step failed.  Build files cannot be regenerated correctly.
  |  
  | Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
  |  
  | You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
  |  
  | See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
  |  
  | Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
  | Please consult deprecation warnings for more details.
  | 1278 actionable tasks: 1265 executed, 13 up-to-date

I think that issue might be related to the monorepo issue (https://github.com/software-mansion/react-native-reanimated/issues/3571), so I am going ahead and apply that patch and see if that resolves it. Will reply back in < 1h

capezzbr avatar Oct 14 '22 15:10 capezzbr

I can confirm that Reanimated 2.11.0 (plus patch referenced in https://github.com/software-mansion/react-native-reanimated/issues/3571#issue-1374122743) does compile with the new architecture on RN 0.69.4 and V8 (so building from source)

capezzbr avatar Oct 14 '22 16:10 capezzbr

@tomekzaw while 2.11 fixes the issue on Android with the new arch, it does break iOS new arch. This happens on RN 0.69 as well as RN 0.70. Here are my logs:

▸ Compiling WorkletsCache.cpp
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/utils/ContextContainer.h:95:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<T> find(std::string const &key) const {
        ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h:54:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<std::string> label{};
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h:108:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<int> min;
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h:109:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<int> max;
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h:110:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<int> now;
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h:111:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<std::string> text{};
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/primitives.h:78:21: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  using OptionalT = std::optional<T>;
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/primitives.h:139:21: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  using OptionalT = std::optional<T>;
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/components/view/ViewProps.h:60:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  std::optional<int> zIndex{};
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h:39:11: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
  virtual std::optional<MountingTransaction> pullTransaction(
      ^
❌  /Users/ci/my-rn-app/node_modules/react-native/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h:37:5: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
    std::optional<T> value,
      ^

capezzbr avatar Oct 14 '22 17:10 capezzbr

Hey @capezzbr, this might be due to C++ version. In particular, std::optional was introduced in C++17. That's why it's missing if you compile with C++14.

I can confirm that Reanimated 2.11.0 (plus patch referenced in https://github.com/software-mansion/react-native-reanimated/issues/3571#issue-1374122743) does compile with the new architecture

Reanimated 2 doesn't support the new architecture. If you need Fabric support, you must use 3.0.0-rc.3.

tomekzaw avatar Oct 18 '22 11:10 tomekzaw

Hey @tomekzaw yeah that make sense, I was reporting the issue since Reanimated 2.10.0 allowed RN 0.69 to build for new/old arch. Which is good for folks that are in the process of migrating their custom modules, since they can build the app for the new arch, and test their native modules in isolation. Anyways can't wait for Reanimated v3 stable release 🎉

capezzbr avatar Oct 24 '22 15:10 capezzbr

Reanimated 2.10.0 allowed RN 0.69 to build for new/old arch

@capezzbr Are you sure that 2.10.0 on 0.69 works with Fabric enabled? 2.x branch does not contain any Fabric-specific code (updating props, modifying C++ ShadowTree) so how is that possible?

tomekzaw avatar Oct 24 '22 15:10 tomekzaw

works with Fabric enabled?

it works as, both iOS/Android apps build, which is good for us so that we can test in CI that PR changes won't break building new arch.

capezzbr avatar Oct 24 '22 15:10 capezzbr

I use "react-native": "0.70.3", "react-native-reanimated": "^3.0.0-rc.3", newArchEnabled=true

with "yarn react-native run-android" then it build and work ,I don`t kown why ,but just can not use android studio run ,it will post error.

okaku123 avatar Oct 25 '22 06:10 okaku123

我也遇到这个问题最终解决了

Android gradle plugin: 7.2.1 Gradle: 7.3.3 "react": "18.1.0", "react-native": "0.70.6", "react-native-reanimated": "^3.0.0-rc.8" 原因: /android/rn/node_modules/react-native/ReactAndroid/build/intermediates/library_jni/debug/jni/arm64-v8a目录没有*.so 所以报上面错误

解决: 去掉gradle优化 #org.gradle.parallel=true

经过:创建空项目运行正常,项目进行对比发现开启了org.gradle.parallel=true 去掉后编译成功

xtdhwl avatar Dec 22 '22 09:12 xtdhwl

我也遇到这个问题最终解决了

Android gradle plugin: 7.2.1 Gradle: 7.3.3 "react": "18.1.0", "react-native": "0.70.6", "react-native-reanimated": "^3.0.0-rc.8" 原因: /android/rn/node_modules/react-native/ReactAndroid/build/intermediates/library_jni/debug/jni/arm64-v8a目录没有*.so 所以报上面错误

解决:

去掉gradle优化 #org.gradle.parallel=true

经过:创建空项目运行正常,项目进行对比发现开启了org.gradle.parallel=true 去掉后编译成功

setting org.gradle.parallel=false didn't make it work

Dat-Mobile avatar Jul 20 '23 16:07 Dat-Mobile

resolved....please follow below link https://github.com/software-mansion/react-native-reanimated/issues/4971#issuecomment-1837591885

Shahzaib114 avatar Dec 03 '23 20:12 Shahzaib114

Could someone confirm whether this issue still persists with the latest versions of Reanimated and React Native, such as 0.72 or 0.73?

piaskowyk avatar Dec 15 '23 12:12 piaskowyk

Running into this on RN 0.73

dorthwein avatar Feb 05 '24 18:02 dorthwein