Skip to content

Android build fails when setting "newArchEnabled" to true #2620

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

Open
mgulfam0722 opened this issue Mar 5, 2025 · 5 comments
Open

Android build fails when setting "newArchEnabled" to true #2620

mgulfam0722 opened this issue Mar 5, 2025 · 5 comments

Comments

@mgulfam0722
Copy link

mgulfam0722 commented Mar 5, 2025

Environment

info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
  Memory: 16.20 GB / 31.75 GB
Binaries:
  Node:
    version: 22.14.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.9.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23726.103.2422.13103373
  Visual Studio: Not Found
Languages:
  Java: 17.0.14
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.0
    wanted: 0.78.0
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Description

When I set the newArchEnabled to true, the android build fails.

* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\My Computer\Desktop\MyAppCli\android\app\.cxx\Debug\6i5q1k3o\arm64-v8a'

C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\My Computer\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\Users\\My Computer\\Desktop\\MyAppCli\\android\\app\\.cxx\\Debug\\6i5q1k3o\\arm64-v8a" ^
        appmodules
    from C:\Users\My Computer\Desktop\MyAppCli\android\app

Reproducible Demo

Just initialized a new project using the command npx @react-native-community/cli@latest init MyApp and the android build fails. Surprisingly when newArchEnabled is set to false, the build succeeds. Why is this so?

@szymonrybczak
Copy link
Collaborator

@mgulfam0722 What's the error?

@mgulfam0722
Copy link
Author

@mgulfam0722 What's the error?

Sorry, forgot to mention that, updated the issue description, should be visible there.
Thanks

@szymonrybczak
Copy link
Collaborator

@mgulfam0722 that's the error with your setup, it's not related to CLI

@mgulfam0722
Copy link
Author

mgulfam0722 commented Mar 7, 2025

@mgulfam0722 that's the error with your setup, it's not related to CLI

Thank you for your response. I have rechecked each and everything as per the documentation but nothing unusual was found. The app builds without any problem when newArchEnabled is set to false.

@mgulfam0722
Copy link
Author

Even expo managed apps work perfectly when setting "newArchEnabled": true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants