Skip to content

Fix build from source for 0.82 due to Gradle 9.0#53560

Closed
cortinico wants to merge 1 commit into
react:mainfrom
cortinico:export-D81482789
Closed

Fix build from source for 0.82 due to Gradle 9.0#53560
cortinico wants to merge 1 commit into
react:mainfrom
cortinico:export-D81482789

Conversation

@cortinico

Copy link
Copy Markdown
Contributor

Summary:
Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.

Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0

Differential Revision: D81482789

Summary:
Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.

Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0

Differential Revision: D81482789
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 2, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D81482789

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 9fbce3e.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cortinico in 9fbce3e

When will my fix make it into a release? | How to file a pick request?

vzaidman pushed a commit that referenced this pull request Sep 8, 2025
Summary:
Pull Request resolved: #53560

Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.

Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0

Reviewed By: fabriziocucci

Differential Revision: D81482789

fbshipit-source-id: 609b503755486e10060a0f321bd0a38bd71864a1
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cortinico in f49ae8a

When will my fix make it into a release? | How to file a pick request?

@kraenhansen

kraenhansen commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

This fails on Windows because the /tmp is treated as a relative path, resolving to node_modules\react-native\tmp (which doesn't exist):

  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Configuring project ':packages' without an existing directory is not allowed. The configured projectDirectory 'D:\a\react-native-node-api\react-native-node-api\apps\test-app\node_modules\react-native\tmp' does not exist, can't be written to or is not a directory.
  
  * Try:
  > Make sure the project directory exists and is writable.
  > Run with --scan to generate a Build Scan (Powered by Develocity).
  
  BUILD FAILED in 1s

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants