Skip to content

Commit

Permalink
Android NDK: Module react_codegen_rncore depends on undefined modules…
Browse files Browse the repository at this point in the history
…: folly_json

```
  /home/fabrizio/Android/Sdk/ndk/21.4.7075529/build/core/build-binary.mk:651: Android NDK: Module react_codegen_rncore depends on undefined modules: folly_json
  /home/fabrizio/Android/Sdk/ndk/21.4.7075529/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.
```

I applied solution in https://stackoverflow.com/a/48897133/7295772
but now caused this error

```
  make: *** [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/build/core/build-binary.mk:725: /home/fabrizio/.gradle/build/react-native-github/ReactAndroid/intermediates/cxx/Debug/83t124q6/obj/local/x86/libreact_codegen_rncore.so] Error 1
  make: *** Waiting for unfinished jobs....
```

Full Logs

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:configureNdkBuildDebug[x86]'.
> [CXX1405] error when building with ndkBuild using /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk: Build command failed.
  Error while executing process /home/fabrizio/Android/Sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk NDK_GRADLE_INJECTED_IMPORT_PATH=/home/fabrizio/.gradle/build/react-native-github/ReactAndroid/.cxx/Debug/83t124q6/prefab/x86 APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/fabrizio/.gradle/build/react-native-github/ReactAndroid/intermediates/cxx/Debug/83t124q6/obj NDK_LIBS_OUT=/home/fabrizio/.gradle/build/react-native-github/ReactAndroid/intermediates/cxx/Debug/83t124q6/lib NDK_APPLICATION_MK=/home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/src/main/jni/Application.mk THIRD_PARTY_NDK_DIR=/home/fabrizio/.gradle/build/react-native-github/ReactAndroid/third-party-ndk REACT_COMMON_DIR=/home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/../ReactCommon REACT_GENERATED_SRC_DIR=/home/fabrizio/.gradle/build/react-native-github/ReactAndroid/generated/source REACT_SRC_DIR=/home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/src/main/java/com/facebook/react APP_STL=c++_shared -j8 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

  /home/fabrizio/Android/Sdk/ndk/21.4.7075529/build/core/build-binary.mk:651: Android NDK: Module react_codegen_rncore depends on undefined modules: folly_json
  /home/fabrizio/Android/Sdk/ndk/21.4.7075529/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.
```

```
  ../ReactCommon/react/nativemodule/core/../../../react/renderer/core/RawValue.h:249: error: undefined reference to 'folly::dynamic::size() const'
  /home/fabrizio/.gradle/build/react-native-github/ReactAndroid/third-party-ndk/folly/folly/dynamic-inl.h:356: error: undefined reference to 'folly::dynamic::operator=(folly::dynamic&&)'
  ../ReactCommon/react/nativemodule/core/../../../react/renderer/core/RawValue.h:249: error: undefined reference to 'folly::dynamic::size() const'
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/build/core/build-binary.mk:725: /home/fabrizio/.gradle/build/react-native-github/ReactAndroid/intermediates/cxx/Debug/83t124q6/obj/local/x86/libreact_codegen_rncore.so] Error 1
  make: *** Waiting for unfinished jobs....
```
  • Loading branch information
fabOnReact committed Mar 16, 2022
1 parent caab17c commit 06c4908
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ APP_CPPFLAGS := -std=c++1y
APP_LDFLAGS := -Wl,--build-id

NDK_TOOLCHAIN_VERSION := clang

APP_ALLOW_MISSING_DEPS :=true

0 comments on commit 06c4908

Please sign in to comment.