Skip to content

[Windows] Gradle release build fails when spaces are in directory path #34878

@micahlt

Description

@micahlt

Description

I'm on Windows. When building my app for release in Android Studio, I receive the following error after Metro successfully generates the assets:

'C:\Users\Micah' is not is not recognized as an internal or external command, operable program or batch file.

The path of the repository is C:\Users\Micah Lindley\Documents\Code\repo. This appears to be an issue with switching over to Hermes as Android Studio says it's tied to this line:

exec {

Help on this is much appreciated, since this prevents my app from being built!

Version

0.70.2

Output of npx react-native info

System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
Memory: 14.97 GB / 31.41 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8512546
Visual Studio: Not Found
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. Create a RN app in a folder with a space in the name
  2. Open Android Studio
  3. Generate a release
  4. See the error

Snack, code example, screenshot, or link to a repository

https://github.com/micahlt/wasteofmobile/tree/reactnative

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions