question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error building with New Architecture

See original GitHub issue

Description

Error in building using latest version of react-native-gesture-handler and react-native,

> Task :react-native-gesture-handler:configureNdkBuildRelease FAILED
C/C++: C:/Users/lam.nh/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../build/core/build-binary.mk:651: Android NDK: Module rngesturehandler_modules depends on undefined modules: folly_runtime
C/C++: C:/Users/lam.nh/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../build/core/build-binary.mk:664: *** Android NDK: Note that old versions of ndk-build silently ignored this error case. If your project worked on those versions, the missing libraries were not needed and you can remove those dependencies from the module to fix your build. Alternatively, set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies.    .  Stop.

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':react-native-gesture-handler:configureNdkBuildRelease'.
> [CXX1405] error when building with ndkBuild using C:\Users\lam.nh\Desktop\test68\node_modules\react-native-gesture-handler\android\src\main\jni\Android.mk: Build command failed.
  Error while executing process C:\Users\lam.nh\AppData\Local\Android\Sdk\ndk\21.4.7075529\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\lam.nh\Desktop\test68\node_modules\react-native-gesture-handler\android\src\main\jni\Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 NDK_OUT=C:\Users\lam.nh\Desktop\test68\node_modules\react-native-gesture-handler\android\build\intermediates\cxx\Release\d65f3214/obj NDK_LIBS_OUT=C:\Users\lam.nh\Desktop\test68\node_modules\react-native-gesture-handler\android\build\intermediates\cxx\Release\d65f3214/lib APP_CFLAGS+=-Wall APP_CFLAGS+=-Werror APP_CFLAGS+=-fexceptions APP_CFLAGS+=-frtti APP_CFLAGS+=-DWITH_INSPECTOR=1 APP_CPPFLAGS+=-std=c++17 APP_PLATFORM=android-21 APP_STL=c++_shared NDK_TOOLCHAIN_VERSION=clang GENERATED_SRC_DIR=C:\Users\lam.nh\Desktop\test68\android\app\build/generated/source PROJECT_BUILD_DIR=C:\Users\lam.nh\Desktop\test68\android\app\build REACT_ANDROID_DIR=C:\Users\lam.nh\Desktop\test68\node_modules\react-native/ReactAndroid REACT_ANDROID_BUILD_DIR=C:\Users\lam.nh\Desktop\test68\node_modules\react-native/ReactAndroid/build APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

  C:/Users/lam.nh/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../build/core/build-binary.mk:651: Android NDK: Module rngesturehandler_modules depends on undefined modules: folly_runtime
  C:/Users/lam.nh/AppData/Local/Android/Sdk/ndk/21.4.7075529/build//../build/core/build-binary.mk:664: *** Android NDK: Note that old versions of ndk-build silently ignored this error case. If your project worked on those versions, the missing libraries were not needed and you can remove those dependencies from the module to fix your build. Alternatively, set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies.    .  Stop.

Platforms

  • iOS
  • Android
  • Web

Screenshots

image

Steps To Reproduce

1/ create new project RN 0.68.2 2/ install react-native-gesture-handler 3/ newArchEnabled=true in gradlew.properties 4/ run android

Expected behavior

Success build

Actual behavior

Fail build

Snack or minimal code example

Package versions

“react”: “17.0.2”, “react-native”: “0.68.2”, “react-native-gesture-handler”: “^2.5.0”

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fgagnetencommented, Aug 6, 2022

I was able to fix the issue. It’s related to react-native-safe-area-context. Here is the PR: https://github.com/th3rdwave/react-native-safe-area-context/pull/302

With my fix I was able to run the app with RN 0.69.3 and the new arch and hermes in true

1reaction
j-piaseckicommented, Jul 12, 2022

Hi! Because of the fact that it’s still very early in the new architecture adoption and some major changes between React Native 0.68 and 0.69 (and the fact that Reanimated will support the new architecture starting with RN 0.69), we decided to make Gesture Handler compatible with RN 0.69 without backwards compatibility (only on the new architecture, when using the old one it should work as expected). I’d recommend upgrading to RN 0.69, which should solve the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TN3117: Resolving architecture build errors on Apple silicon
TN3117: Resolving architecture build errors on Apple silicon. Update your app's architecture build settings to support building macOS, iOS, watchOS, and tvOS ...
Read more >
React native: MainApplication.java "new architecture doesn't ...
I ran into a similar error during upgrade of react native to 0.68. The problem was that some of the new packages and...
Read more >
Troubleshooting - React Native
This page contains resolutions to common problem you might face when migrating to the New Architecture.
Read more >
Building a list we can delete from - Build Error [Entry point ...
for architecture x86_64 error. I tried to add @main to my ContentView.swift code but that produced more errors. All of the solutions to...
Read more >
Citicorp Center engineering crisis - Wikipedia
In the original design, potential wind loads for the building were calculated incorrectly. The flaw was discovered by Diane Hartley, an undergraduate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found