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.

Getting ReactAndroid:configureNdkBuildDebug Error when NewArch is Enabled

See original GitHub issue

New Version

0.68.1

Old Version

0.67.3

Build Target(s)

Android Debug

Output of react-native info

System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel® Core™ i7-2640M CPU @ 2.80GHz Memory: 447.12 MB / 3.88 GB Binaries: Node: 16.15.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 30, 31, 32 Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0 Android NDK: 24.0.8215888 Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 11.0.15 - C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

My Issue:

I’m facing an error when buidling my react-native project, to be precisely, it’s an ndk problem when NewArch is enabled, but when it’s disabled, build success.

Error Log:

`> Task :ReactAndroid:configureNdkBuildDebug[arm64-v8a] FAILED C/C++: C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/…/ReactCommon/butter/Android.mk:28: *** Android NDK: Aborting. . Stop.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:ReactAndroid:configureNdkBuildDebug[arm64-v8a]’.

[CXX1405] error when building with ndkBuild using C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\src\main\jni\react\jni\Android.mk: Build command failed. Error while executing process C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\src\main\jni\react\jni\Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_LIBS_OUT=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\2l523i4m/lib NDK_APPLICATION_MK=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/src/main/jni/Application.mk THIRD_PARTY_NDK_DIR=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\build\third-party-ndk REACT_COMMON_DIR=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/…/ReactCommon REACT_GENERATED_SRC_DIR=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\build/generated/source REACT_SRC_DIR=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/src/main/java/com/facebook/react -j4 NDK_OUT=C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform.cxx NDK_APP_SHORT_COMMANDS=true APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n} Android NDK: WARNING: Ignoring unknown import directory: C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid\build/generated/source Android NDK: C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/…/ReactCommon/butter/Android.mk: Cannot find module with tag ‘glog’ in import path Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ? Android NDK: The following directories were searched: Android NDK:

C:\Users\Administrator\Documents\GitHub\MoonMeet-CrossPlatform\node_modules\react-native\ReactAndroid/…/ReactCommon/butter/Android.mk:28: *** Android NDK: Aborting. . Stop.`

Attachments:

I’ve seen something like Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ? i did define it but still the same error

Screenshot (12)

Screenshot (13)

I can provide another files if recommended, Thanks React-Native Team!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:43 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
fortmarekcommented, May 9, 2022

The fix should be a part of the 0.68.2 release, so follow the Github releases and let us know if you no longer see the issue on that version once it’s out 🙂

3reactions
cortinicocommented, May 4, 2022

please mention me if you guys fix it!

Yesterday I was able to test #33707 and verify that is effectively fixing the issue, with NDK 21 + I needed a new release of react-native-codegen (which is something we’ll have to do on the release branch as well).

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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