Skip to content
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

Execution failed for task ':react-native-reanimated:buildCMakeDebug[x86_64]' #6855

Open
James-Coulson opened this issue Dec 26, 2024 · 7 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@James-Coulson
Copy link

Description

We've recently been encountering the below issue when attempting to build out Expo application for the Android platform (on a Windows machine).

> Task :react-native-reanimated:buildCMakeDebug[x86_64] FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-reanimated:buildCMakeDebug[x86_64]'.
> Cannot access output property 'soFolder' of task ':react-native-reanimated:buildCMakeDebug[x86_64]'. Accessing unreadable inputs or outputs is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.10.2/userguide/incremental_build.html#sec:disable-state-tracking in the Gradle documentation.
   > java.io.IOException: Cannot snapshot C:\APP\node_modules\react-native-reanimated\android\build\intermediates\cxx\Debug\2u525q44\obj\x86_64\libc++_shared.so: not a regular file

I've spent a significant amount of effort going through and attempting to fix with any methods I can find including:

  • Moving the project to the root directory to avoid path length issues
  • Downgrading NDK package version
  • Increasing all package versions to the latest available.
  • Minor manual changes to build.gradle file
  • Adding 'react-native-reanimated/plugin' to babel config

Additionally, the application builds successfully when targeting iOS on a Mac.

Any assistance on how this could be resolved would be greatly appreciated. Thanks in advance.

package.json

{
  "name": "APP",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "reset-project": "node ./scripts/reset-project.js",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "test": "jest --watchAll",
    "lint": "expo lint"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@aws-amplify/react-native": "^1.1.6",
    "@expo/vector-icons": "^14.0.4",
    "@hookform/resolvers": "^3.9.1",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-masked-view/masked-view": "0.3.2",
    "@react-navigation/bottom-tabs": "^7.0.0",
    "@react-navigation/native": "^7.0.0",
    "@tanstack/react-query": "^5.61.5",
    "aws-amplify": "^6.10.0",
    "dayjs": "^1.11.13",
    "expo": "~52.0.20",
    "expo-blur": "~14.0.1",
    "expo-constants": "~17.0.3",
    "expo-font": "~13.0.1",
    "expo-haptics": "~14.0.0",
    "expo-linear-gradient": "~14.0.1",
    "expo-linking": "~7.0.3",
    "expo-router": "~4.0.15",
    "expo-splash-screen": "~0.29.18",
    "expo-status-bar": "~2.0.0",
    "expo-symbols": "~0.2.0",
    "expo-system-ui": "~4.0.6",
    "expo-web-browser": "~14.0.1",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-hook-form": "^7.54.0",
    "react-native": "0.76.5",
    "react-native-element-dropdown": "^2.12.2",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-get-random-values": "^1.11.0",
    "react-native-reanimated": "~3.16.1",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",
    "react-native-svg": "15.8.0",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.5",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@types/jest": "^29.5.12",
    "@types/react": "~18.3.12",
    "@types/react-test-renderer": "^18.3.0",
    "jest": "^29.2.1",
    "jest-expo": "~52.0.2",
    "react-test-renderer": "18.3.1",
    "typescript": "^5.3.3"
  },
  "private": true
}

Steps to reproduce

See attached github repo

  1. Create new expo project using npx create-expo-app
  2. Install react-native-reanimated using npx expo install react-native-reanimated
  3. Attempt to run app npx expo run:android

Snack or a link to a repository

https://github.com/James-Coulson/react-native-reanimated-repro

Reanimated version

3.16.1

React Native version

0.76.1

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

Debug app & dev bundle

Device

Android emulator

Device model

Medium Phone API 35

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided labels Dec 26, 2024
@natuanorg
Copy link

I am facing same issue

@natuanorg
Copy link

Hi @James-Coulson, have you resolved the issue?

@James-Coulson
Copy link
Author

Hey, no we're still facing this issue.

@yuvaraj-ait
Copy link

I'm also run into same issue. There is any fixes available. Kindly let me know

@James-Coulson
Copy link
Author

I've managed to get the project working. I had to create a babel config using expo customize and add the react native reanimated plugin. The babel config I used is below.

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: ['react-native-reanimated/plugin']
  };
};

@James-Coulson
Copy link
Author

Issue has reappeared. Still no consistent solution

@James-Coulson James-Coulson reopened this Jan 3, 2025
@DevDK12
Copy link

DevDK12 commented Jan 5, 2025

This issue is haunting me from 1 month, first it took my considerable amount of time at initial stage and now again at final build time this library is causing error. And still no update on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

4 participants