Skip to content

Build fails on subsequent ./gradlew clean build due to unreadable prefab directory #7317

@shiluka

Description

@shiluka

Description

When running ./gradlew clean build without --refresh-dependencies, the build fails on the second attempt with the error:

Error: invalid value for <package_path>: directory ".../node_modules/react-native-reanimated/android/build/intermediates/prefab_package/debug/prefab" is not readable

The error occurs because the prefab directory becomes corrupted or inaccessible between builds. Manually deleting directories or using --refresh-dependencies temporarily fixes the issue, but this is not sustainable for CI/CD pipelines.

Steps to reproduce

  1. Run a clean build: ./gradlew clean build # Works ✅
  2. Run the same command again without code changes: ./gradlew clean build # Fails ❌

Snack or a link to a repository

none

Reanimated version

3.17.1

React Native version

0.78.1

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

Fabric (New Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Missing reproThis issue need minimum repro scenarioPlatform: AndroidThis issue is specific to Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions