-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ReactAndroid:configureNdkBuildDebug Error when NewArch is Enabled #33742
Comments
Hey @CortexTN 👋 You might try to check out these two PRs (#33682 and #33707) and patch your local React Native to see if that helps. Whenever those PRs are merged, we plan to release another patch release In the meantime, if you could also provide reproducible steps, that would be fabulous. @mganandraj do you think this issue might be related to your PRs? |
Thanks for responding, I don't know how to reproduce steps for issues, but i clearly remember myself followed react native upgrade helper guide then i builded the app end up getting this error |
I recommend creating a new app with |
I'll try it and comeback to you ASAP |
Hello again @fortmarek |
Thanks for getting back to us - the fix should be hopefully be merged soon 🙌 You can also try out the new |
Yep, PR#33707 should fix the build on Windows boxes with reasonable application root path.. But, as long as we use NDK21, we are still prone to issues with long file paths if the root path is long (>15 chars).. |
I've tried patching my local react native with your changes and unfortunately it didn't work |
Could you share the build logs ? |
sure but not now, I'm outside doing some businesses, I'll mention the build logs as soon i back home (i may stay 3 hours outside) |
Hey @mganandraj This is the build log from gradle, i think that this what you meant by build log. |
@fortmarek the 0.69 release candidate one have a problem with most dependencies, an error like |
@CortexTN You root directory is very long : "C:/Users/Administrator/Documents/GitHub/MoonMeet-CrossPlatform/" log file suggests the build is failing while setting up the gdbserver, even before the compilation starts. Could you try creating th e project directly under "c:". Also, use powershell for building, which supports longer command lines. One more caveat: If you applied the changes in the above mentioned PR, make sure that you manually apply the changes in the android.mk in react-native-codegen. |
If you could provide some more details and post them here, somebody might be able to look into that 👍 |
Tried this, but didn't work (tried without patching my local react native, kinda lazy to do so) |
sorry sir, already downgraded yesterday |
I haven't found any Android.mk in react native codegen |
for now, I'll downgrade to |
Yup we're still looking into how to build the New Architecture on Windows as the proposed fixes (i.e. #33707) haven't been confirmed yet. |
@CortexTN Unfortunately, Applying #33707 is still required to reduce the file path lengths to below windows limits, even after shortening the root path .. Yeah, it doesn't sound great :( The longer term solution is to upgrade NDK to r22 which doesn't have this long file path limit (If configured so through Windows registry) but we are seeing some intermittent crashes with r23. We are working on sorting it out ! |
yeah i noticed the reduced file paths, but still some long paths, even trying all NDK versions |
Yesterday I was able to test #33707 and verify that is effectively fixing the issue, with NDK 21 + I needed a new release of |
Hello Again. |
Hello Everyone, is there any news expected soon ? |
The fix should be a part of the |
Hello again, sorry for the delay, thank you for your work! |
@CortexTN have you been able to confirm that |
didn't try it, i will try it later, I've been busy with some things outside, I'll comment and close this issue when i can confirm it works |
@fortmarek |
Hello, i didn't try it yet, still have some problems, i can't code at the moment, I'll try with different NDK version ASAP |
Hello again, i've been trying with different NDK Versions, and all failed on NDK build NDK 21NDK 23NDK 24I hope you guys fix this ASAP, Thanks. |
@mganandraj are the persistent errors due to the current paths too long or is it indicative of the issue not being resolved? |
@CortexTN Can you try to build with Windows Power Shell? |
VSCoduim default terminal use PowerShell |
i think the issue is not being resolved, please see the logs, I can't see long paths, but something called |
hello again, great news, new arch works on windows with fresh project, the problem is with my project, I'll do some workaround to see what's the bug on my project, Thanks all for your work |
log.txt |
Hey @CortexTN The error you're experiencing is most likely related to dirtly build folder. |
hey folks, I just realised that this is technically a duplicate of #33528. |
0.68.2 NewArch of Android not work on Mac 11.6.5
|
This issue is about Windows, not Mac. Please open another 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(R) Core(TM) 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.
Execution failed for task ':ReactAndroid:configureNdkBuildDebug[arm64-v8a]'.
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 errorI can provide another files if recommended, Thanks React-Native Team!
The text was updated successfully, but these errors were encountered: