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.

Upgraded to RN 0.68 - Android

See original GitHub issue

Using "react-native-screens": "3.13.1"

Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-screens:configureNdkBuildDebug'.
> [CXX1405] error when building with ndkBuild using /home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/Android.mk: Build command failed.
  Error while executing process /home/user/Android/Sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 NDK_OUT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/build/intermediates/cxx/Debug/50316q29/obj NDK_LIBS_OUT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/build/intermediates/cxx/Debug/50316q29/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=/home/user/projects/own_projects/app/android/app/build/generated/source PROJECT_BUILD_DIR=/home/user/projects/own_projects/app/android/app/build REACT_ANDROID_DIR=/home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid REACT_ANDROID_BUILD_DIR=/home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid/build APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
  Android NDK: ERROR:/home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/Android.mk:fb: LOCAL_SRC_FILES points to a missing file    
  Android NDK: Check that /home/user/projects/own_projects/app/android/app/build/react-ndk/exported/armeabi-v7a/libfb.so exists  or that its path is correct   
  
  /home/user/Android/Sdk/ndk/21.4.7075529/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.

react-ndk are not being generated. I’ve used the latest updated template from https://github.com/react-native-community/react-native-template-typescript

Edit:

After removing this package and other 2 which was causing similar issues, the build ran with fabric activated and react-ndk was generated. But after, I installed react-native-screens back and it gave another error.

Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-screens:buildNdkBuildDebug[rnscreens_modules]'.
> Build command failed.
  Error while executing process /home/user/Android/Sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 NDK_OUT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/build/intermediates/cxx/Debug/w5138666/obj NDK_LIBS_OUT=/home/user/projects/own_projects/app/node_modules/react-native-screens/android/build/intermediates/cxx/Debug/w5138666/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=/home/user/projects/own_projects/app/android/app/build/generated/source PROJECT_BUILD_DIR=/home/user/projects/own_projects/app/android/app/build REACT_ANDROID_DIR=/home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid REACT_ANDROID_BUILD_DIR=/home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid/build rnscreens_modules}
  [armeabi-v7a] Compile++ thumb: rnscreens_modules <= RNScreensComponentsRegistry.cpp
  
  In file included from /home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/RNScreensComponentsRegistry.cpp:1:
  In file included from /home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/RNScreensComponentsRegistry.h:3:
  In file included from /home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactory.h:12:
  In file included from /home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid/../ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h:12:
  /home/user/projects/own_projects/app/android/../node_modules/react-native/ReactAndroid/../ReactCommon/butter/map.h:14:10: fatal error: 'folly/container/F14Map.h' file not found
  #include <folly/container/F14Map.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  make: *** [/home/user/Android/Sdk/ndk/21.4.7075529/build/core/build-binary.mk:478: /home/user/projects/own_projects/app/node_modules/react-native-screens/android/build/intermediates/cxx/Debug/w5138666/obj/local/armeabi-v7a/objs-debug/rnscreens_modules//home/user/projects/own_projects/app/node_modules/react-native-screens/android/src/main/jni/RNScreensComponentsRegistry.o] Error 1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
dougg0kcommented, Apr 8, 2022

So, I took a bit more time to find out the reason, turns out none of the 3 libraries have any problems, it was a configuration that I was using from gradle to speed things up org.gradle.parallel=true. After removing that, build worked.

I’ve used this https://github.com/react-native-community/react-native-template-typescript and instealled react-native-screens, react-native-gesture-handler and react-native-safe-area-context, after enabling New Arch + Hermes and build went through.

1reaction
leotmcommented, Apr 5, 2022

Same here, was working before in RN 0.68.0-rc.4 with workaround:

But seems back again in RN 0.68.0 (with or without the workaround)

While ensuring local.properties is correct, repro with instructions here


(Similar but different issue with react-native-safe-area-context)

When both react-native-screens and react-native-safe-area-context removed, Android building successfully with all 4 default ABIs and various JDKs (v11, v17, v18)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing React Native 0.68
Today we are announcing the 0.68.0 release of React Native, with opt-in ... Android Gradle Plugin was updated to 7.0.1, enforcing JDK 11...
Read more >
index.android.bundle missing in APK after upgrading to RN 0.68
Found it after comparing the build files with a brand new RN app! I had classpath("com.android.tools.build:gradle:7.1.2"). in android/build.
Read more >
What's New in React Native 0.70 — How to Upgrade and Why ...
Android launch times with and without the Hermes engine. ... Using the new architecture is getting easier with every RN release, ...
Read more >
Expo SDK 45. Today we're announcing the release of…
Bumped Android compileSdkVersion to 31 and Java 11. React Native 0.68. This React Native release is the first with support for the New...
Read more >
React Native Upgrade Helper
It knows which packages* versions are compatible with your specific version of RN, and it uses that knowledge to align dependencies, keeping your...
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